sql server - Issue with CTE syntax -


what issue below code?

with cte2 ( select 1 id union select 2 ), cte3 (     select * cte2 ) select * cte3 

it fails syntax error.

you dont need with in code.

when using multiple ctes, can separate them comma , dont need multiple withs.

with cte2 ( select 1 id union select 2 ), cte3 (     select * cte2 )  select * cte3 

Comments

Popular posts from this blog

1111. appearing after print sequence - php -

node.js - Express and Redis - If session exists for this user, don't allow access -

excel - I can't get the attachement of the email PHP -