简体   繁体   English

如何将Sql Server 2008中的表中的所有数据复制到文件

[英]How to copy all the data from a table in Sql Server 2008 to file

我在sql server 2008中创建了一个表,该表包含大量记录。我需要将该表中的所有数据都获取到脚本文件中。

If you have SSMS; 如果你有SSMS;

  1. Right click on your database 右键单击您的数据库
  2. Generate scripts 生成脚本
  3. Change radio button to Select specific database objects 更改单选按钮以选择特定数据库对象
  4. Check the tables box 检查表格框
  5. Select your table 选择你的桌子
  6. Next 下一个
  7. Set the filename etc 设置文件名等
  8. Click on Advanced button 单击“ 高级”按钮
  9. Change the Types of data to script setting to Schema and data 数据类型更改为脚本设置为架构和数据
  10. Click next to finish 单击“下一步”完成

Blog post here with screenshots for clarification 博客文章在这里有截图以澄清

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM