How to Export the Query Result to .csv file in SQL Server?

Here’s another tip where you could export the query result to .csv file in SQL Server.

How to Export the Query Result to .csv file in SQL Server?

Follow the below steps to export the query result in SQL Server to .csv file.

1. Open SQL Server Management Studio

2. Click the button “New Query” and start entering your “SELECT Query” to display the result.

3. When the results are displayed in the grid, right click on the grid and click “Save Results As…” button in the context menu.


4. This will provide you with the options to save the Grid Results in different formats. Select “CSV (Comma delimited)” file format from the Save as type dropdown list and provide the name to the file and click the save button.


5. The saved file will contain the exported data

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a Reply


Interesting BlogPosts to read

Column Alias and Square brackets in SQL Query.
When we want to specify a alias for a column in SQL Query , we tend to use the double quotes or sing...
How to get the MAX row with group by in LINQ query using C# ?
Below is a sample code snippet demonstrating how to retreive the max row with the group by in LINQ Q...
Webinar - The Shortcomings of SQL for SharePoint Sync
Redmond Magazine is hosting a webinar on the topic "The Shortcomings of SQL for SharePoint Sync" on ...