Create SQL INSERT Script with values gathered from table

后端 未结 5 1299
迷失自我
迷失自我 2020-12-08 06:17

I need to create a INSERT script in order to insert in another database the same data.
If in SQL Server I select \"Script table as > INSERT To\" I can easily recreate t

5条回答
  •  無奈伤痛
    2020-12-08 06:38

    You can do this with SSMS.

    1 - Right-click your database in Object Explorer.
    2 - Select Tasks/Generate Scripts...
    3 - On the Set Scripting Options page, click the Advanced button and make sure Types of data to script is set to Data only.

    The resulting script will have a USE DATABASE statement at the top. Change this to the database you would like to insert the data into.

提交回复
热议问题