当前位置:Gxlcms > 数据库问题 > 数据库中存在0,1,2.....或者1,null,2 排序时让0或者null在最后的sql语句

数据库中存在0,1,2.....或者1,null,2 排序时让0或者null在最后的sql语句

时间:2021-07-01 10:21:17 帮助过:4人阅读

技术分享

 select * from yryz_products_t order by isnull(sort),sort;     select * from yourtable order by cast(sort as int);   此sql为转换

数据库中存在0,1,2.....或者1,null,2 排序时让0或者null在最后的sql语句

标签:http   技术   es2017   sele   语句   nbsp   sel   alt   log   

人气教程排行