比较运算符:=、>、<、>=、<=、<>、!=、<=> SELECT AVG(col_name) FROM tb_name; # 对指定字段使用聚合函数SELECT ROUND((AVG(col_name),2) FROM tb_name; # 对聚合函数结果保留两位小数SELECT col_name1,col_name2 FROM tb_name WHERE col_name1 >(SELECT ROUND((AVG(col_name),2) FROM tb_name) ; # 子查询作为外层查询的条件 SELECT...FROM...WHERE col_name > [ANY|SOME|ALL](...) # ANY、SOME、ALL关键字
原文地址:https://www.cnblogs.com/Lengjie/p/9439960.html
时间: 2024-10-03 05:08:54