Script all data from SQL Server database

前端 未结 3 1142
忘掉有多难
忘掉有多难 2020-12-03 01:35

I have two databases with equivalent structure and I need to extract data from one of them in form of INSERT statements (generate script to apply it on the othe

3条回答
  •  隐瞒了意图╮
    2020-12-03 02:09

    SSMS supports scripting all data as INSERTS in 2k8:

    Right click on a database and select Tasks->Generate Scripts...

    Pick only the tables, Click Next.

    Click on the Advanced button. Scroll down and select "Types of data to script" == Data Only

    enter image description here

    Decide whether you want results in a new query window or a file. Click on to Finish.

    You then change the using DBname at the top of the script.

提交回复
热议问题