Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: copy tables (t-sql)


Message #1 by "ann win" <awin@a...> on Fri, 13 Apr 2001 01:09:42
The quick way is SELECT * INTO targetdb.dbo.targettable FROM
sourcedb.dbo.sourcetable. You can also use DTS or the import/export wizard
or probably a few other things. If you need to copy the constraints and
indexes, I believe that you are stuck scripting the table, then copying the
data separately.

HTH,

Darin Strait, MS SQL Server Development and Administration
http://home.earthlink.net/~dstrait/professional/resume.htm


----- Original Message -----
From: "ann win" <awin@a...>
To: "sql language" <sql_language@p...>
Sent: Friday, April 13, 2001 1:09 AM
Subject: [sql_language] copy tables (t-sql)


> Hi,
> How can I copy tables (structure and data) from one database into another
> using t-sql?  Thanks.
> -ann
> 

  Return to Index