Ted Zhang

关于Sharepoint及.NET的种种...
CTE

Why use CTE:

  • Improve code readability
  • Breaking up complex queries into smaller blocks

Execution Scope:

Don’t use “Go” keyword between CTE and the reference query, only the query that following CTE could use it.

For multiple query definitions in CTW, use UNION ALL, UNION, INTERSECT, EXCEPT

You can create multiple CTEs, separate them with ‘,’instead of “WITH”

posted on 2014-02-19 17:40  Ted Zhang  阅读(188)  评论(0编辑  收藏  举报