all groups > sql server programming > july 2004 >
You're in the

sql server programming

group:

Create empty table from existing view


Create empty table from existing view Justin
7/30/2004 10:29:05 PM
sql server programming:
Is it possible to create a empty table from SQL view...like shown below?

CREATE TABLE tmpTable AS SELECT * FROM MyView WHERE 1=2

TIA

J Justin

Re: Create empty table from existing view Vishal Parkar
7/31/2004 11:12:28 AM
yes, in SQL Server the syntax is:

SELECT * into tmpTable FROM MyView WHERE 1=2

--
Vishal Parkar
vgparkar@yahoo.co.in | vgparkar@hotmail.com

AddThis Social Bookmark Button