Tuesday, September 17, 2013

make temporary table


what is "with etc" command?and i can use 3"with etc"command in a query?



Hello Seyed,


What for a command do you mean? The easiest way to create a temp table with data is to use a SELECT INTO query, like:



SELECT *
INTO #myTempTable
FROM sys.objects;

SELECT *
FROM #myTempTable;





Olaf Helper


[ Blog] [ Xing] [ MVP]

No comments:

Post a Comment