Saturday, 31 July 2010

Data Transfer and table creation

1) Transfering data from one table to another with same schema

INSERT INTO temp SELECT * from dbo.tempPK

2) Create temporary table with same schema and Transfering data

Select * into #temp from dbo.tempPK

3) Create physical table with same schema and Transfering data

Select * into temp from dbo.tempPK

4) Create physical table with same schema but no data Transfer

Select * into temp from dbo.tempPK where 1=2