Mysql 操作日常记录

来源:互联网 发布:vlc 看网络电视 编辑:程序博客网 时间:2024/06/05 08:28

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

原创粉丝点击