Madhivanan's TSQL Blog

Exploring SSMS - Copy results with header

As you know I have started a new series on "Exploring SSMS" by which I will be posting some features that are available in SSMS which will be very helping during the development. In this post we will see how to copy the results with column names included.

Suppose you want to export the query result to a text or excel file and you want to include column names in the first line, follow the following steps. After the results are shown in the grid,

Select Grid content-->Right click-->Copy with headers

Now you can paste the results to a file with first row as column names