Scenario:
Sometime we want to move table with data from one server to another server. One way to achieve this by using Generate Script Task in SSMS.
Solution :
We can use Generate Script Task from SSMS to perform this task. Here are the steps
Step 1:
Right click on database and then go to Tasks and then go to Generate Scripts
Step 2:
Wizard will start as shown below, Click next
Step 3:
You can choose to script entire database objects (Tables, views, stored procedure etc) or Choose the tables you want to script with data
Step 4:
Once you Click Next, Next screen will get to to Advance tab where you can choose if you want to script data with definition as shown below
Step 5:
You have option to save all scripts to file or you can script to new Query window. Press Next after selecting where you want to save script and it will generate scripts with data for you.