How to generate scripts to recreate table using SQL Server Management Studio [Schema and data]?

1- Open SQL server Management Studio.

2- Right click on the DB that contains your desired table.

3- Select “Tasks => Generate Scripts…”.

4- Follow on the wizard, and choose the objects that you want to generate scripts for (Tables, Views, Stored Procedures, etc… ).

5- From the next step, click on “Advanced“, and for the node that is labeled “Types of data to script” choose “Schema and data“.

enter image description here

6- Save your script and smile 🙂

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)