select t1.field1, count(t1.field2) countsfrom table1 t1,join table2 t2on t1.id = t2.idwhere t.1.field2 = 'F'group by t1.field3having (counts > 3)order by t1.filed?,...SQL的解析过程1 from table1.1这里有一个 join on 就是表的关联,对于表的关联分为三种 内关联,外关联,还有就是所谓笛卡尔积2 where 条件的过滤 也就是true 和false的过滤3 group by 进行分组4 having 仅适用于与聚合行数5 回到 select 根据select 的字段来作为数据的相识6 就是 order by 对数据的显示作一个排序
上一篇:学习创建数据库有什么用?
下一篇:SQL2005怎么创建数据库?