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
 Copy tables across databases

Author  Topic 

Sqlfreak
Starting Member

5 Posts

Posted - 2009-09-22 : 10:21:22
hi,

i am new to MS SQL.
i am currently working on SQL server 2008.
i would like to know how i can copy tables from one database to the other?

could you please provide me with some sample code too.
thanks for your time.


"live and let live..."

senthil_nagore
Master Smack Fu Yak Hacker

1007 Posts

Posted - 2009-09-22 : 10:33:53
select * into destdb.dbo.newtablename from sourcedb.dbo.tablename

Senthil.C
------------------------------------------------------
[Microsoft][ODBC SQL Server Driver]Operation canceled

http://senthilnagore.blogspot.com/
Go to Top of Page
   

- Advertisement -