Sql笔记

1,在sql语句中,--表示单行注释,/*...*/表示多行注释

2,sql语句中使用with as 提高子查询性能与可读性

参考内容:使用WITH AS提高性能简化嵌套SQL

3,with (nolock)提高sql的查询效率

参考内容:WITH (NOLOCK)

4,left join/inner join/right join的区别

参考内容:sql之left join、right join、inner join的区别

5,IsNull的用法

参考内容:http://blog.sina.com.cn/s/blog_417b22130100kpk0.html

6,内置函数ROW_NUMBER的用法

参考内容:sql ROW_NUMBER() 排序函数

7,Union以及Union All

参考内容:http://www.w3school.com.cn/sql/sql_union.asp

原文地址:https://www.cnblogs.com/SharpL/p/4582617.html