我正在使用SQL Server Management Studio.
我希望将查询结果保存到excel文件中.
我 Select "另存为",然后保存到可以在excel中打开的CSV文件.除了缺少列标题之外,一切都很好,我知道如何导出它们吗?
我正在使用SQL Server Management Studio.
我希望将查询结果保存到excel文件中.
我 Select "另存为",然后保存到可以在excel中打开的CSV文件.除了缺少列标题之外,一切都很好,我知道如何导出它们吗?
Tools
> Options
> Query Results
> SQL Server
> Results to Text (or Grid if you want)
> Include columns headers in the result set
更改此选项后,您可能需要关闭并重新打开SSMS.
On the SQL Editor Toolbar you can select save to file without having to restart SSMS