Total Pageviews

11/16/2011

SQL Server : Copy table from one database to another database




Come across situation where I need to copy table from database “db2 “to database “db1”  with data, for that a very handy & useful query given below :-

Example:

             SELECT * INTO db1.dbo.table1
             FROM db2.dbo.table2

Please mind that this query only copies table schema and data only.

All constraints, indexes, statatics, you need to use alternatives


2 comments:

questions to ask said...

Personally, I'm very comfortable that this request copies the bottom of the table and the table itself and no extra information.

damla said...

https://saglamproxy.com
metin2 proxy
proxy satın al
knight online proxy
mobil proxy satın al
C3E6Y0

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Affiliate Network Reviews