2019.11.30 Mysql查询知识
作者:互联网
不等于:<>
判断为空的条件:null和空格(空字符串)
判断是否为null:xxxx is not null / xxxx is null
模糊查询:like
SELECT * FROM score WHERE sname LIKE '大%';(%控制多个字符)
SELECT * FROM score WHERE sname LIKE '大_';(_控制一个字符)
SELECT * FROM score WHERE sname LIKE '__';(两位字符)
聚合查询:sum(求和)avg(平均数)max(最大值)min(最小值)count(总记录数)
SELECT SUM(js) FROM score WHERE sclass='j1018';
SELECT AVG(html) FROM score WHERE sclass='JAVA-1018';
标签:sname,LIKE,Mysql,30,score,2019.11,null,WHERE,SELECT 来源: https://www.cnblogs.com/l1314/p/11961373.html