Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 duplicating table with all constraints

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-07-29 : 07:26:13
Chandy writes "Hi,
Question: Is it possible at all to duplicate a table with
primary keys / foreign keys / triggers . (some of these might be optional)

I was going through the flow chart of create table command and dont think it supports this feature.


Was it a LBW for the guru? :)

Thanx
Chandy"

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-07-29 : 12:37:03
Just generate the script for the table using Enterprise Manager (make sure to select the correct things that you want scripted), then open the script up in Query Analyzer. Then modify the script so that it points to a different name.

Tara
Go to Top of Page
   

- Advertisement -