Copy column headers in query result window seems an easy task however, it can be a nightmare for amateurs. There is no visible instruction/link/button where in one can click and copy the selected data with column headers. Let’s see how to copy column headers in SQL Server Management Studio query window.
One way to do this is to
– In the result grid, select the data to copy
– Right click and select “Copy with headers”
Another way to do this is by selecting “Include column headers when copying or saving the results” in Options menu as shown below.
Navigate to Tools – Options – Query results – SQL server – Results to Grid. On the left hand pane check “Include column headers when copying or saving the results” option and click OK.
The change will apply to new query window and not to existing/open query window.
Like us on FaceBook | Join the fastest growing SQL Server group on FaceBook