在Sql Server Management Studio中使用标题保存结果 [英] Saving results with headers in Sql Server Management Studio
问题描述
我希望将查询的结果保存到excel文件。
我选择另存为,然后保存到CSV文件,我可以在excel中打开。所有的好,除了我错过列标题,任何想法如何导出?
工具 - >选项 - >查询结果 - > SQl服务器 - >结果到文本(或网格,如果你想) - >在结果集中包含列标题
您可能需要关闭并重新打开SSMS此选项。
* 在SQL编辑器工具栏上,您可以选择保存到文件,而无需重新启动SSMS
I am using SQL Server Management Studio.
I wish to save the results of a query to an excel file.
I choose "save as" and then save to CSV file which I can open in excel. All good except I am missing column headers, any ideas how I get them exported?
tools -> options -> query results -> SQl Server -> results to text (or grid if you want) -> Include columns headers in the result set
You might need to close and reopen SSMS after changing this option.
* On the SQL Editor Toolbar you can select save to file without having to restart SSMS
这篇关于在Sql Server Management Studio中使用标题保存结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!