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

 select * from yryz_products_t order by isnull(sort),sort; 
 
 select * from yourtable order by cast(sort as int);   此sql为转换
原文地址:https://www.cnblogs.com/austinspark-jessylu/p/7542394.html