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
 General SQL Server Forums
 New to SQL Server Programming
 Quick Q

Author  Topic 

norty911
Starting Member

41 Posts

Posted - 2007-07-31 : 04:14:46
Hey guys,
How would you copy data between two identical tables residing on two different databases?

So we have table1 on database1 and table2 on database2. I would like to copy the entire contents from table1 to table2.

Muchos gracias

pbguy
Constraint Violating Yak Guru

319 Posts

Posted - 2007-07-31 : 04:42:44
It is the same way we copy the content within the database....the difference is the database name need to be specified.

Insert databasename.dbo.tablename
select * from
databasename.dbo.tablename


--------------------------------------------------
S.Ahamed
Go to Top of Page
   

- Advertisement -