crystal-351130
Newbie
Points: 7
More actions
July 21, 2006 at 12:53 am
#173393
hi all..
any1 knows how to copy only the structure of table A to table B? i dont know the script.
colin.Leversuch-Roberts
SSC Guru
Points: 52643
July 21, 2006 at 2:37 am
#650603
right click on table in MS and script to create as new query.
There are some good books available on sql 2005 !!
[font="Comic Sans MS"]The GrumpyOldDBA[/font]www.grumpyolddba.co.ukhttp://sqlblogcasts.com/blogs/grumpyolddba/
Lynn Pettis
Points: 442467
July 21, 2006 at 7:03 am
#650662
Another way:
select * into TableB from TableA where 1 = 2
Be sure TableB does not exist. Also this will not copy indexes, constraints, etc.
dharper3
SSCrazy
Points: 2391
July 23, 2006 at 7:41 pm
#650971
Or from Management Studio you could use the export wizard to export only the table and its assoc indexes etc. to the target DB.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply