I have a mysql table where a column can have NULL values. Can someone help me with a SQL to return all the rows with the column is null, and as well as the next non-null rows?
Eg:
row 1, NULL
row 2, foo 1
row 3, foo 2
row 4, NULL
row 5, foo 3
row 6, foo 4
row 7, foo 5
row 8, NULL
row 9, foo 6
SQL will return:
row 1, NULL
row 2, foo 1
row 4, NULL
row 5, foo 3
row 8, NULL
row 9, foo 6