惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
Vercel News
Vercel News
F
Fortinet All Blogs
Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
P
Proofpoint News Feed
M
MIT News - Artificial intelligence
Blog — PlanetScale
Blog — PlanetScale
H
Help Net Security
B
Blog RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Engineering at Meta
Engineering at Meta
爱范儿
爱范儿
V
Visual Studio Blog
Stack Overflow Blog
Stack Overflow Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog
宝玉的分享
宝玉的分享
云风的 BLOG
云风的 BLOG
U
Unit 42
博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
博客园 - 叶小钗
Hugging Face - Blog
Hugging Face - Blog
MongoDB | Blog
MongoDB | Blog
The Cloudflare Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Tailwind CSS Blog
S
Schneier on Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Apple Machine Learning Research
Apple Machine Learning Research
Attack and Defense Labs
Attack and Defense Labs
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
A
About on SuperTechFans
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
LangChain Blog
博客园 - 【当耐特】
Recorded Future
Recorded Future
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
aimingoo的专栏
aimingoo的专栏
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Hacker News: Ask HN
Hacker News: Ask HN
Jina AI
Jina AI
Schneier on Security
Schneier on Security
W
WeLiveSecurity
Microsoft Security Blog
Microsoft Security Blog
博客园_首页
博客园 - 聂微东

博客园 - Benny Ng

微软企业库Enterprise Library 5连接AS/400 UDB DB2的连接方法. (成功) 我可以在ASP.NET MVC的真正發展為免費的嗎?[转贴] SQL-记录表历史[转] 转自:http://www.cnblogs.com/codelove/archive/2011/07/02/2096296.html (自用,备份) WINXP下安装IIS+PHP5+MySQL5 64位Windows 7 sp1使用MyEclipse 9.0注册机无法获取System ID 配置JDK环境变量 vs2010 sp1 安装假死的问题解决,先把ISO文件内的可以安装的EXE文件都安装一次,特别是SILVERLIGHT那些,然后再安装ISO的SETUP就可以了。 CD %systemroot%\system32\Inetsrv\ appcmd list wp - Benny Ng SQL SERVER – Fix : Error Msg 1813, Level 16, State 2, Line 1 Could not open new database ‘yourdatabasename’. CREATE DATA Server 2005 专用管理员连接 (DAC) 使用技巧 只有MDF文件如何恢复数据库 在win7的操作系统下安装Oracle11R2 Comparing escape(), encodeURI(), and encodeURIComponent() <a href='#' => <a href='javascript:void(-1) 页面不跳转到最高处。 “页面跳转”。 sql 条件处理 Web Service 安全性解决方案(SOAP篇) SSRS (Reporting Services) 2008 当导出PDF看不到中文字的时候,是没有安装SQL2008 SP1的原因。(可能会显示框,或者字符显示不完整) Visual Studio 2010 Extension Manager: Online Gallery Behind Internet Proxy 配置windows 2008 作为远程访问SSL-VPN服务器系列之一 - Benny Ng
SQL Server 2008支持将数据导出为脚本 [转]
Benny Ng · 2011-05-20 · via 博客园 - Benny Ng

以前我们要将一个表中的数据导出为脚本,那么只有在网上找一个导出数据的Script,然后运行就可以导出数据脚本了。现在在SQL Server 2008的Management Studio中增加了一个新特性,除了导出表的定义外,还支持将表中的数据导出为脚本。导出过程是这样的,我简单说明下:

(1)在SSMS2008中的对象资源管理器中,右击需要导出数据的数据库,在弹出式菜单中选择“任务”下的“生成脚本”选项。

(2)在脚本向导的选择脚本选项中,将“编写数据的脚步”选择为TRUE,这里默认是为FALSE的。

SQL Server 2008支持将数据导出为脚本 - jacky - jackyxfl的博客

(3)然后下一步选择导出的对象,选择导出的表,最后完成时即可以看到由系统导出的表定义和表数据了,例如我们导出Person.AddressType表中的数据,那么系统生产的表数据这部分的脚步就是:


SET IDENTITY_INSERT [Person].[AddressType] ON
INSERT [Person].[AddressType] ([AddressTypeID], [Name], [rowguid], [ModifiedDate]) VALUES (1, N'Billing', N'b84f78b1-4efe-4a0e-8cb7-70e9f112f886', CAST(0x00009BB600305BC5 AS DateTime))
INSERT [Person].[AddressType] ([AddressTypeID], [Name], [rowguid], [ModifiedDate]) VALUES (2, N'Home', N'41bc2ff6-f0fc-475f-8eb9-cec0805aa0f2', CAST(0x00009BB600305BC5 AS DateTime))
INSERT [Person].[AddressType] ([AddressTypeID], [Name], [rowguid], [ModifiedDate]) VALUES (3, N'Main Office', N'8eeec28c-07a2-4fb9-ad0a-42d4a0bbc575', CAST(0x00009BB600305BC5 AS DateTime))
INSERT [Person].[AddressType] ([AddressTypeID], [Name], [rowguid], [ModifiedDate]) VALUES (4, N'Primary', N'24cb3088-4345-47c4-86c5-17b535133d1e', CAST(0x00009BB600305BC5 AS DateTime))
INSERT [Person].[AddressType] ([AddressTypeID], [Name], [rowguid], [ModifiedDate]) VALUES (5, N'Shipping', N'b29da3f8-19a3-47da-9daa-15c84f4a83a5', CAST(0x00009BB600305BC5 AS DateTime))
INSERT [Person].[AddressType] ([AddressTypeID], [Name], [rowguid], [ModifiedDate]) VALUES (6, N'Archive', N'a67f238a-5ba2-444b-966c-0467ed9c427f', CAST(0x00009BB600305BC5 AS DateTime))
SET IDENTITY_INSERT [Person].[AddressType] OFF

哈哈,还SET IDENTITY_INSERT ON了,支持对IDENTITY列的数据插入,比我们一般用脚本或者存储过程来导要方便,希望这个功能对大家有用。

PS:由于这个功能在联机丛书中似乎也没有介绍,而且默认又是关闭的,所以大家估计都没有注意到这个功能,我也一直没有注意到,直到今天在看一篇国外的博客才看到的。