Blog Post

CTE - Limitations

,

Hi

Wanted to explore one of the major limitation of CTE in sql 2012 i.e. it cannot be used inside if else statement . This is something basic as the definition of cte that it must be followed by a select, insert, update or delete statement.

That is we cannot have following condition:-

with cte
(
)

if
select cte
else
select cte
end

Thanks

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating