SELECT * FROM lzh_topic_channel_product ORDER BY order_id is null , order_id 

 

 

其中的ORDER BY order_id is null  ,mysql默认生序(asc),false为0 在true(1) 之前

如果使用ORDER BY order_id is null desc, 则空值排在非空之后

不实用is null 也可以使用函数 isnull(order_id)

相关文章:

  • 2022-12-23
  • 2021-04-08
  • 2021-09-27
  • 2022-12-23
  • 2022-12-23
  • 2022-01-17
  • 2022-12-23
  • 2021-09-13
猜你喜欢
  • 2021-09-13
  • 2021-05-18
  • 2022-12-23
  • 2022-01-13
  • 2021-11-10
  • 2022-01-07
  • 2022-12-23
相关资源
相似解决方案