
Hi
I think the Two databases are there in same Server Instances.
You can do this by "Three part naming convension"
If you have enabled IDENTITY on that tables then. Yo have to consider the following
1. You want to transfer the all column info 'as is' including Identity column.
2. You want to transfer the all column info Except Identity column.
Including Identity:Use Db2
Go
Set Identity_Insert Tbl2 on
Go
Insert Tbl2(column1,column2,...)
Select column1,column2,... from Db1.dbo.Tbl1
Go
Set Identity_Insert Tbl2 off
Go
Except Identity:Use Db2
Go
Insert Tbl2(column2,column3,...)
Select column2,column3,... from Db1.dbo.Tbl1
Go
Note: Column1 is the Identity column enabled.
Cheers
Cheers
www.SQLServerbuddy.blogspot.com
iLink Multitech Solutions
Anu_dgr8, if this helps please login to Mark As Answer. | Alert Moderator