Move database tables to different database.

I am using MSSQL Management studio.  Is there a way to replicate a copy of the table in the red rectangle to the database at the bottom of the image?

SQL.png
rrhandle8Asked:
Who is Participating?
 
Brian CroweDatabase AdministratorCommented:
Right-click on the source database
Select "Tasks"
Select "Generate Scripts..."
There may be an introduction page to "Next" past
Select the "Select specific database objects" radio button
Expand and select the tables you want to move
Click [Next >]
Click [Advanced]
Change the "Types of data to script" to "Schema and data"
Select "Save to file" and provide a destination
Click [Next >]
Click [Next >] on Summary Page
Click [Finish] on Save or Publish Scripts page

After you have created the script just open it up and change the USE statement at the top to point to the database you want to move them to then execute the script.

Hope this helps,
Brian
0
 
rrhandle8Author Commented:
Just what I needed.  Thanks for the clear instructions!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.