How to export the Insert Data statement from the SQL Server database

Source: Internet
Author: User

In SSMS of the Object Explorer, right click on the database right-click and pick "Tasks" and "Generate Scripts".

This would allow you to generate scripts-a single or any tables, and one of the options is "Script Data". If you set this to TRUE, the wizard would generate a script with INSERT in () statement for your data.

NB if using R2 or its called something else, see screenshot below this one

R2 or later eg 2012

Elect ' Types of data to Script ' which can be ' data only ', ' schema and Data ' or ' schema only '-the default.

And then there's a "SSMS Addin" package on Codeplex (including source) which promises pretty much the same functionality a nd a few more (like Quick find etc.)

For the sake of over-explicit brainlessness, after following marc_s ' instructions ...

In SSMS of the Object Explorer, right click on the database right-click and pick "Tasks" and "Generate Scripts".

... I then see a wizard screens with "Introduction, Choose Objects, Set Scripting Options, Summary, and Save or Publish SCR IPTs"With Prev, Next, Finish, cancel buttons at the bottom.

On the Set Scripting options Step, you have a to click ' Advanced ' to get the page with the options. Then, as Ghlouw have mentioned, you now select the "Types of data to script" and profit.

How to export the Insert Data statement from the SQL Server database

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.