查询语句

1.

  select ...from...  [into...]       //distinct去重 ;  top n 项数

  where...  //

  group by...  //分组

  having...  //指定组或聚合的搜索条件

  order by...   //排序

  compute...  //附加函数

  union [all] express2//

2.

  with 临时命名 的结果集

eg:

  with ageReps(age,ageCount) as

  (

  select age,count(*) from employee

  group by age

  )

  select age,ageCount from ageReps

 

posted @ 2019-05-17 10:40  赵钱富贵  阅读(208)  评论(0编辑  收藏  举报