博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
怎么从sqlserver 数据库导出 insert 的数据语句
阅读量:6500 次
发布时间:2019-06-24

本文共 1239 字,大约阅读时间需要 4 分钟。

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

This will allow you to generate scripts for a single or all tables, and one of the options is "Script Data". If you set that to TRUE, the wizard will generate a script with INSERT INTO () statement for your data.

nb if using 2008 R2 or 2012 its called something else, see screenshot below this one

alt text

2008 R2 or later eg 2012

elect "Types of Data to Script" which can be "Data Only", "Schema and Data" or "Schema Only" - the default).

enter image description here

And then there's a "" Package on Codeplex (including source) which promises pretty much the same functionality and a few more (like quick find etc.)

 

 

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

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

... I then see a wizard screen with "Introduction, Choose Objects, Set Scripting Options, Summary, and Save or Publish Scripts" with prev, next, finish, cancel buttons at the bottom.

On the Set Scripting Options step, you have to click "Advanced" to get the page with the options. Then, as  has mentioned, you now select "Types of data to script" and profit.

advanced button HIGHLIGHTED IN RED!1!!

转载地址:http://advyo.baihongyu.com/

你可能感兴趣的文章
PHP——图片上传
查看>>
mysql的基本知识
查看>>
exchange 2003配置ASSP 反垃圾邮件
查看>>
CQRS学习——最小单元的Cqrs(CommandEvent)[其一]
查看>>
webpack入门(二)what is webpack
查看>>
UnitOfWork以及其在ABP中的应用
查看>>
学习C语言必须知道的理论知识(第一章)
查看>>
for语句内嵌例题与个人理解
查看>>
眠眠interview Question
查看>>
Linux C++/Java/Web/OC Socket网络编程
查看>>
[转]CSS hack大全&详解
查看>>
c语言第八次作业
查看>>
RPC-client异步收发核心细节?
查看>>
POJ-1753 Flip Game 枚举 状态压缩
查看>>
〖Linux〗使用Qt5.2.0开发Android的NDK应用程序
查看>>
idea快捷键
查看>>
Finalize/Dispose/Destructor
查看>>
33.搜索插件——autocomplete
查看>>
使用XML在MSSQL把字串分解
查看>>
顺序结构,判断结构 if,switch
查看>>