Monday, March 19, 2012

move table in sql server management studio 2005 express

I have two databases in sql server management studio and I want to move tables from one into another. Is this possible? and how? Thanks

Andrew

you can script table and execute script in second database or if you need to move data try:

select * into [destinationdatabase].dbo.[destinationtablename] from [sourcedatabase].dbo.[sourcetablename]

You can use the same table name for source and destination so in destiantion database you will have exact copy of your data.

Sorry no constrains will be moved.

Thanks

|||

When you say constrains do you mean database relationships, keys etc.

Cheers

Andreww

|||Ahh yes i see now. Thanks.

No comments:

Post a Comment