If I have 2 type of data in a table, which is either ID1 or ID2 empty, how can I select the rows that ID1 is not empty and also is the latest inserted row first , then follow by the data with ID2 not empty?
Example:
Data | ID1 | ID2
1 | ok |
2 | | ok
3 | ok |
and returns:
Data | ID1 | ID2
3 | ok |
1 | ok |
2 | | ok
Thank you very much.
Try this: