mysql - Left Join with Null Script Efficiency Explanation Needed -


why use left join in sql in from clause , attach where clause entity "is null"? told efficient script , should learn methodology behind it.

for example:

from         left join arow , brow b , crow c , drow d     brow.b null; 

this kind of construct used when want know "a list of customers have never ordered anything" :

select   customer.*   customers   left join    orders   on     orders.customerid = customers.id   orders.id null 

or quote old manager of mine: "can database give me list of isn't in database?"

me> "sure, can give me list of things database should tell doesn't have?"

him> "how supposed know that?"


Comments

Popular posts from this blog

python - django admin: changing the way a field (w/ relationship to another model) is submitted on a form so that it can be submitted multiple times -

go - serving up pdfs using golang -

ffmpeg - Using Live555 HTTP capacities as a server for signaling -