SQL Server Management Studio – Copy With Headers


I’m writing this on the train to Seattle to visit with a customer this morning – I’m thankful for Wireless! Although setting up a wireless network for a train is a really big thing, sometimes it’s the smaller things that make us happy.

In SQL Server Management Studio (SSMS), you can open a query window and have the results sent to a grid output. Sometimes you want to copy some (or all) of those rows out to another application like Excel or Word. And one of the most frustrating things is that you don’t get the headers of the rows of what you just copied. Well, it’s a problem no more. Run a query, select your rows, and then right-click them. We’ve now got a menu item called "Copy with Headers" that does exactly what it says.

Oh, there’s another feature that you might not be aware of – you can hold down the CTRL (Control) key and click on various cells and then right-click those for a copy or copy with headers.

Comments (3)

  1. tigrom2002 says:

    Hi!

    You did not specified in which version of Management Studio is this true…

    Later then 2008 (including)

    Earlier versions does not support this feature

  2. dougjake says:

    My problem is I can't get the function to copy WITHOUT headers. No matter how I copy the results, the headers are always included. PITA.

Skip to main content