Bite my bytes

What I learn by day I blog at night - A blog from Microsoft Consultant working from Ljubljana, Slovenia

  Home :: Contact :: Syndication  
  999 Posts :: 7691 Comments :: 235 Trackbacks


Most popular posts
in last 30 days


My Projects



Copyright © by David Vidmar
Contact me!
LinkedIn Profile

Now this is so useful it's worth to repost!

If you need to copy query result in MS SQL Server Management Studio with column names, there is a checkbox in the options to do that. That should be really by turned on by default, imho.

Thanks you, Steven Smith:

A minor frustration I've had with SQL Server for years is that when copying the results to Excel, the column names are not included.  Well, Brendan blogged about this yesterday, and in a great demonstration of the value of blogging, he received a comment with the answer to this problem within a couple of hours.  It turns out this can be done by going to Tools - Options - Query Results - Sql Server - Results to Grid - Include column headers when copying or saving results.  Beautiful.  Here's a screenshot if you have problems finding it.


Be sure to check "Result to Text" to, since there is an option to include columns there too!

Posted on Thursday, June 05, 2008 3:32 PM | Filed under: Developement |


# re: Save SQL query results with column names in MSSSMS 6/22/2008 8:43 PM ahmad

# re: Save SQL query results with column names in MSSSMS 7/17/2009 6:10 PM Sunil
This is a great help.

Thanks a lot.


Comments have been closed on this topic.