最大值:select max(num) from table第二大值:select max(num) from table where num not in(select max(num) from table)第三大值:select max(num) from table where num not in(select max(num) from table where num not in(select max(num) from tab
mysql中null值的排序問題分析 如下表t_user:? name age zhangsan 1 lisi NULL wangwu 2 www.2cto.com ? 執行一下sql:? Sql代碼 ? select * from t_user order by age; ? name age lisi NULL zhangsan 1 wangwu 2 實際上我們是想將沒有填寫age的記錄放在最后