How do I copy and paste one record from SSMS 2012 without the header (when it comes along without me asking for it)? In SSMS, Tools -> Options -> Query Results -> SQL Server -> Results to Grid -> "Include column headers when copying or saving the results" is unchecked. Sometimes I would like to copy the header, however most of the time I would like to copy and paste one record into Excel and the header comes along uninvited - either when I do ctrl + C or just right click and "Copy". I've tried rebooting my computer to be sure it wasn't some sort of cached functionality but I can't seem to shake the header. Please help!
-
5You're not the only one. I'm having the same issue. – Jimmy Jan 21 '15 at 19:51
8 Answers
I don't have a root cause. However, a comment on a blog led me to realise that the problem only exists when you right click and go 'Select Top X' or similar. If you go 'new query' and manually enter that query, you can then copy without headers.
I'm still looking for the root cause and a complete solution. Will update my post if I discover anything further.

- 383
- 3
- 11
-
2If I use `SELECT TOP X` from the Object Explorer then examine the query options for the window it creates, the option "Include column headers when copying or saving the results" is checked, even though it is unchecked in my defaults. – mr.Reband Apr 25 '17 at 16:28
I think it is looking at the wrong setting value.
I unchecked Tools -> Options -> Query Results -> SQL Server -> Results to Text -> "Include column headers in the result set"
Opened a new query window and the functionality worked as expected i.e. Ctrl-C copied just the Grid cell contents, Shift-Ctrl-C included the headings.

- 91
- 1
- 2
-
2I just experienced this issue today. Unchecking that value, opening new window, etc, doesn't help in my case. – WiredEarp Aug 31 '15 at 23:43
If you select the records in Edit-mode of the grid then the Headers will not be copied in a CTRL+C and CTRL+V action
-
2We know how it's SUPPOSED to work. Unfortunately, I now also have this same BUG where
+ – Hannover Fist Sep 09 '16 at 16:05gives me the headers when I paste. -
1Whether you ctrl+c or right click and copy (option which don't include headers), it brings over the headers. – Nahuatl_C137 Dec 09 '18 at 15:10
If option that you have described is unchecked, then Ctrl-C should copy data without headers. Have just verified it.

- 2,879
- 20
- 25
-
1Something is wrong with the setting. I'm experiencing the same issue. – Panzercrisis Apr 03 '15 at 15:34
If you have already unchecked "Include column headers in the result set" through Tools -> Options -> Query Results -> SQL Server -> Results to Text -> "Include column headers in the result set" and your still having issues.
- Copy your entire query
- Open New Query Window
- Paste query
- Run Query
- Ctrl + C or right click, copy.
This worked for me when working with Excel.

- 132
- 1
- 13
In addition to checking the Results to Grid settings under Tools -> Options, check the properties of the query itself. Right click in the query window, select "Query Options..." and inspect the check boxes in Results -> Grid. The "Select Top 1000 Rows" query from the table context menu defaults to include column headers when copying or saving results. If you're using a query window opened by the select top 1000 function, the query property is the likely culprit.

- 29
- 4
To maybe save someone else 15 mins of frustration researching this:
I just experienced this problem, which persisted after unchecking Tools -> Options -> Query Results -> SQL Server -> Results to Grid -> "Include column headers when copying or saving the results
I had to restart SSMS for the changes to take effect.

- 7,399
- 8
- 54
- 84
-
3Why would I have to restart the application for changes to take effect, how absurd is that? Doesn't even give a message to the user that that has to happen. ROLL EYES at MSFT. – EdHayes3 May 18 '18 at 14:28
-
-
1-1 As stated in the question: This is what is expected, but doesn't work. When you use the top left corner to select all rows, also the headers are copied. – H. de Jonge Sep 18 '18 at 11:14
-
@H.deJonge The point of the answer was that I had to restart SSMS before the changes took effect (hence the opening comment: To maybe save someone else 15 mins of frustration researching this), that solved my problem (and seemingly EdHayes3s). Seems like it might help a few people coming from google too – Preston Sep 18 '18 at 11:27
-
@User632716 This option has always been off for me and SSMS has of course been restarted many times. But now I have "played" with the options and saved them and this morning it finally worked again. Please incorporate this in your answer, so SO allows me to remove the -1. – H. de Jonge Sep 19 '18 at 09:24
-
The problem comes from "Select Top 1000 Rows" in the Object Explorer, it has that option turned on by default. If you use "New Query" it works as expected. – Patrick Oct 09 '19 at 17:16
This post is now a bit old, but the default is not to include headers. I ran across this problem, reset my settings to default since I didn't have my customized settings anyways. This fixed the problem for me.

- 117
- 1
- 9