What is CTE "Common table expression"

Common Table Expression:-

Is a temporary result set where we can use for execution like Insert, Update, Delete and Select.

CTE always begin => ;with

Syntax:-

     ;with                                                        => Start with a with.
     mycteexample(Name, Age)                    =>Coloumn Name reqiured to display
     as                                                         
     (
        select Name, Age from Employee      => SQL STATEMENT
     )
     select * from mycteexample
     

Share this

Previous
Next Post »

:)
:(
hihi
:-)
:D
=D
:-d
;(
;-(
@-)
:P
:o
:>)
(o)
:p
:-?
(p)
:-s
(m)
8-)
:-t
:-b
b-(
:-#
=p~
$-)
(y)
(f)
x-)
(k)
(h)
cheer