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

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -