Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get Management Studio 2005 to copy the headers from result sets?

Tags:

ssms

By default when you copy/paste data from a query window in SSMS it does not copy the column headings. How can I get these headers to be copied along with the data?

like image 367
Joe Phillips Avatar asked Aug 27 '10 14:08

Joe Phillips


2 Answers

  1. Open Tools menu
  2. Open Options...
  3. Expand Query Results
  4. Expand SQL Server
  5. Expand Results to Grid
  6. Check Include column headers when copying or saving the results

Note that this will only work on the "New Query" types of windows -- not the "Open table" (editable) windows.

like image 143
Joe Phillips Avatar answered Sep 29 '22 23:09

Joe Phillips


Results with headers was added in SSMS 2008. Ctrl-Shift-C works as well.

like image 41
TTRider Avatar answered Sep 30 '22 00:09

TTRider