How to create a new table based on the existing table

Posted by Goldytech under Sql Server category on | Views : 2580
Suppose you have tableA in your database. You want to create tableB with the similiar structure. Below is the command of it

select * 
into tableB
from tableA
where 1=2

If you want to copy the table along with the records then remove the where codition

Comments or Responses

Login to post response