Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql servre 2000, ignorant's question: copy a table 1

Status
Not open for further replies.

pssheba

Programmer
Oct 22, 2004
87
IL
Hi !
a very basic question: I have a table in a database. I'd like to copy it to another database. how is it done ?
[blush]
Thanks !
 
It depends what you mean with COPY, do you want only data or you want the whole table with its indexes, triggers and all other constrains.

1. Copy only data:
Code:
SELECT * INTO NewDataBase.dbo.TableName FROM OldDataBase.dbo.TableName

2. Copy table with all other objects:
Run EM, right click on database name (in the Treeview on left). Choose All Task->Export data, then follow the wizard.

Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
MVP VFP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top