Thursday, 3 January 2013

CTE

A common table expression (CTE) can be thought of as a temporary result set that is defined within the execution scope of a single SELECT, INSERT, UPDATE, DELETE, or CREATE VIEW statement.

For Example : -


WITH useOf_CTE(Col1,Col2,Col3,Col4)
as
(
select Col1,Col2,Col3,Col4 from tbl_Table1
)
select * from useOf_CTE


No comments:

Post a Comment