HOME / Posts Tagged: MySQL
SQL joins explained as Venn diagrams
A handy illustration explaining how left and right joins work in SQL, presented as Venn diagrams. For some examples with actual data, check also this article by Jeff Atwood h/t Ilya Grigorik, Data Visualization (on G+)
MySQL ordering alphabetically with empty strings last
Here is a small #MySQL tip: Say you want to order your query results alphabetically, but keep the empty fields last, what do you do? If you do SELECT string FROM table ORDER BY string;You will get ‘ ‘, ‘ ‘, ’1′, ’2′, ’3′, ‘A’, ‘B’, ‘C’ But if you doSELECT string FROM table ORDER [Continue reading]