I have a Table (call it A_table
) in a database (call it A_db
) in Microsoft SQL Server Management Studio, and there are 10 rows.
I have another database (call it B_db
), and it has a Table (call it B_table
), which has the same column settings as A_table
has. But the B_table
is empty.
What I want:
A_table
to B_table
.Is there any option in Microsoft SQL Server Management Studio 2012, to create an insert SQL from a table? Or is there any other option to do that?
Quick and Easy way:
tasks
In SSMS 2017 you need to ignore step 2 - the generate scripts options is at the top level of the context menu
Thanks to Daniel for the comment to update.generate scripts
Types of data to script
- Called types of data to script
in SMSS 2014 Thanks to Ellesedil for commentingdata only
I usually in cases like this generate to a new query editor window and then just do any modifications where needed.