Saving results with headers in Sql Server Management Studio

后端 未结 10 2238
长发绾君心
长发绾君心 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:50

    The same problem exists in Visual Studio, here's how to fix it there:

    Go to:

    Tools > Options > SQL Server Tools > Transact-SQL Editor > Query Results > Results To Grid
    

    Now click the check box to true: "Include column headers when copying or saving the results"

提交回复
热议问题