27 April 2012

Temporary Table - Common Table Expression (CTE)

CTE – Common Table Expression
adalah table temporary seperti derived SQL atau VIEW.

-----start-----
WITH Sample_TempTable_Using_WITH
AS
(
 SELECT 'ID01' [ID_Number], 'ITEM0001' [Item_ID]
)

SELECT * FROM Sample_TempTable_Using_WITH
-----end-----