with
cte1 as
(
select * from table1 where name like 'abc%'
),
cte2 as
(
select * from table2 where id > 20
),
cte3 as
(
select * from table3 where price < 100
)
select a.* from cte1 a, cte2 b, cte3 c where a.id = b.id and a.id = c.id
请问一下这个语句那里有错,在sql查询分析器中报错:
消息 156,级别 15,状态 1,第 1 行
在关键字 'with' 附近有语法错误。
消息 170,级别 15,状态 1,第 2 行
第 2 行: ',' 附近有语法错误。
我就是在查询分析器中单独执行。