Some My Experiences

Header Ads

Showing posts with label MySQL. Show all posts
Showing posts with label MySQL. Show all posts

Monday, 4 February 2019

04 Feb

MySQL Positioning Order NULL Row to The End

Order by sequence number in ascending, positioning NULL value at last (order by id ascending) SELECT * FROM picrure ORDER BY -sequence DESC, id ASC; Given example: picture table id sequence name 1 NULL picture_one 2 1 picture_two 3 2 picture_three 4 NULL ...