您的位置:首页 > 数据库

SQL语句执行顺序分析

2010-10-19 13:07 453 查看
1.select 列名 from表名/视图名 where 条件.
2.select 列名 from 表名/视图名 where 条件 group by (列) having 条件
3.select 列名 from 表名/视图名 where 条件 group by (列) having 条件 order by 列表
4.select 列名 from 表1 join 表2 on 表1.列1=表2.列1...join 表n on 表n.列1=表(n-1).列1 where 表1.条件 and 表2.条件...表n.条件

1. 先from 后where 后select
2. 先from后where 再group 再having 后select
3. 先from后where 再group 再having 再select 后order
4. 先from后join 再where 后select
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: