摘要: 概念:CTE:Common Table Expression,简称CTE,中文可以叫做,通(公)用表表达式.用处:处理以前版本中SQL不好现实,不好理解,复杂的查询问题.比如:分页,递归查询...基本语法:WITH <name of your CTE>(<column names>)AS(<actual query>)SELECT * FROM <name of your CTE>示例一(基本用法):WITH MyCTE(ID, NAME)AS( SELECT EmployeeID AS ID, FirstName + ' ' + 阅读全文
posted @ 2012-10-16 15:20 Devil_Zhang 阅读(441) 评论(0) 推荐(0) 编辑