SQLSERVER学习四:常用检索语句

1、聚合(主要采用聚合函数),group by 先分组,后聚合

2、union 列相同(all、distinct)

3、join :left、inner

4、子查询:

  •   where in (子查询语句) //包含
  •   where not in (子查询语句) //不包含
  •   where exist (子查询语句)  //存在
  •   where not exist (子查询语句) // 不存在
  •   where 列 = any (子查询语句)  //只要满足任意一个即可
原文地址:https://www.cnblogs.com/juanheqiao/p/14339005.html