Mysql small common considerations in mind

1. Scheduling

  If a field in accordance with the normal ascending order, will be discharged in front of a null value; null if sorted in reverse order at the bottom.

  Sometimes we need this field is blank row data to be pushed to the bottom, then only need to:

order by second_parent_name is null, second_parent_name, user_name

 

Guess you like

Origin www.cnblogs.com/qlqwjy/p/11564308.html