Monday, May 7, 2012

Create Table from another Table in SQL SERVER

select * into Newtable from oldtable where name like 'a%'

 Above query create table with name Newtable and copy all data from oldtable,


I f u want to create only structure as same as old table then you
can use :

WHERE 1=2

select * into   Newtable from oldtable where 1=2