sql优化:with as 做 union all的子查询 来避免屡次扫描表

语法:html 1.结构: with 别名 as ( 公共sql片断 )sql 2.CTE(公共表达式)后面必须直接紧跟使用CTE的SQL语句,不然失效;code 如:htm 1) with cr as (select CountryRegionCode from person.CountryRegion where Name like 'C%' ) 索引   select * from pers
相关文章
相关标签/搜索