aeshaw


Is there a quick way in Management Studio to ... i don't know ... drag and drop or maybe copy and paste or import the 3 tables (The 2 databases are on the same instance of SqlServer 2005)

-perplexed newbie




Re: I want to 'Copy' 3 tables from an existing DB into a new DB on the same SqlServer instance.

Madhu K Nair


AFAIK .. there is no drag & drop or copy paste feature for this in SSMO. If u want only data u can use select *into DB1.DBo.ObjectName from DB1.dbo.Objectname. If you want with exact schema, then script it from DB1 run it in DB2 and then copy the data using insert into statement

Madhu







Re: I want to 'Copy' 3 tables from an existing DB into a new DB on the same SqlServer instance.

ggciubuc

Right click on first db->Tasks->Export data... and you will go in an easy way to copy your tables







Re: I want to 'Copy' 3 tables from an existing DB into a new DB on the same SqlServer instance.

Madhu K Nair

ggciubuc wrote:
Right click on first db->Tasks->Export data... and you will go in an easy way to copy your tables

this will cretae a table with only data not with all constraints. To create constratin u have to script it.

Madhu






Re: I want to 'Copy' 3 tables from an existing DB into a new DB on the same SqlServer instance.

ggciubuc

Yes it is and is a normal situation because in a new database in many cases, there are not same relationships between tables. To the other part these constraints can be easy rebuild with Database Diagrams