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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 copy tables

Author  Topic 

nt4vn
Yak Posting Veteran

98 Posts

Posted - 2008-07-22 : 07:15:21
hello,

I would like to copy two tables: LETTER AND LETTER_CASE from server 1 to the same server and rename that two tables with different name (for example: current table named: LETTER, then the copy table will name as LETTER_2008)

Please show me how to do it...thanks,

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-07-22 : 07:20:12
Select * into LETTER_2008 from LETTER
Select * into LETTER_CASE_2008 from LETTER_CASE

or

Scrip the tables;rename;run the script; then

Insert into LETTER_2008(columns)
Select columns from LETTER

Insert into LETTER_CASE_2008(columns)
Select columns from LETTER_CASE



Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-22 : 14:38:19
Any constraints that are in main table, if needed to be created in new table also, then use script method.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-07-22 : 23:05:24

Or use Export/Import task
Go to Top of Page

nt4vn
Yak Posting Veteran

98 Posts

Posted - 2008-07-24 : 13:41:38
Thank you All!
Go to Top of Page
   

- Advertisement -