mysql中的select语句where条件group by ,having , order by,limit的顺序及用法

it2022-05-08  1

-- 语法: SELECT select_list    FROM table_name   [ WHERE search_condition ]   [ GROUP BY group_by_expression ]   [ HAVING search_condition ]   [ ORDER BY order_expression [ ASC | DESC ] ] [limit m,n] -- 示例: -- limit 0,10是从第一条开始,取10条数据 select classNo from table_name group by classNo having(avg(成绩)>70) order by classNo limit 0,10

 

转载于:https://www.cnblogs.com/yuan9580/p/10292361.html


最新回复(0)