Saving results with headers in Sql Server Management Studio

后端 未结 10 2246
长发绾君心
长发绾君心 2020-12-13 01:35

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 ca

10条回答
  •  伪装坚强ぢ
    2020-12-13 01:42

    At least in SQL Server 2012, you can right click in the query window and select Query Options. From there you can select Include Headers for grid and/or text and have the Save As work the way you want it without restarting SSMS.

    You'll still need to change it in Tools->Options in the menu bar to have new query windows use those settings by default.

提交回复
热议问题