Beside And
a friend, asks for a favor, what the query u could use to retrieve records from 2 tables that are almost the same which are different. he was saying about retrieving records besides the records that can be retrieved by inner join. that means he needs everything outside the complement of the union of the records from the two tables (am i explaining it right?). so i suggest select * from tbla, tblb where cola1 != colb1 and cola2 != colb2 and so on for the rest of the column.
and he said it wont work, because it will only retrieve rows which columns are all different. hmm he got a point there. so i called him later on that day, and feel like struck by some feeling, which archimedes first discover about liquid pressure (?), that aha feeling, i said he should use or instead of and.
the next morning, how can i be so dumb to suggest him to use and in the first place? isnt on of the first law that u learn about union, that !(a and b) == !a or !b ?
!(a or b) == !a and !b, or something like that.. (i get confused my self, HOW UNFORGIVABLE!)
~yaagitudeeehh


1 Comments:
boolean kadang emang bikin pusing
Post a Comment
<< Home