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.
Author |
Topic |
ssmani84
Starting Member
20 Posts |
Posted - 2010-02-25 : 01:00:39
|
hi to All,how to copy the table wih data one DB to another Dbpls help mei tried some way but its only copy the table fields onlyssmaniyadav |
|
vaibhavktiwari83
Aged Yak Warrior
843 Posts |
Posted - 2010-02-25 : 01:48:31
|
SELECT * INTO DB1.dbo.newtablename FROM DB2.tablenameor you can use if there is an existing tableINSERT INTO DB1.dbo.existingtable SELECT * FROM DB2.tablenameVabhav T |
|
|
ssmani84
Starting Member
20 Posts |
Posted - 2010-02-25 : 02:10:49
|
Thanks vaibhav thanka a lotssmaniyadav |
|
|
Kristen
Test
22859 Posts |
Posted - 2010-02-25 : 02:24:04
|
Note that that will get you Identity column (if one exists in the source table) and a Primary Key (ditto).It will NOT get you any Secondary indexes, Foreign keys, Constraints (I think??), or Triggers. For those you will have to make scripts on the Source DB and execute them on the Destination DB |
|
|
|
|
|