Mysql 操作日常記錄

1、刪除多餘的空記錄
delete from table where column1 is null and colunm2 is null;
2、group by函數的排序問題(求和與排序)
select sum(bian_page) bian_page,sum(shen_page) shen_page,sum(jiao_page) jiao_page ,name,xueduan,xueke,sum(day) day from table where xueduan=’{1}’ and status=’1’ and xueke=’{1}’ GROUP by name ORDER by bian_page DESC

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章