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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -