To include column headers when pasting or saving sql results in Microsoft SQL Server Management Studio you must make a change on the Options Panel:
- Open the Options panel in the menu bar
- Navigate to Query Results -> SQL Server -> Results to Grid
- Check “Include column headers when copying or saving the results.”
This works for SQL Server 2005/2008. In SQL Server 2000’s Query Analyzer there was a button in the tool bar that turned on this option.
Thu, Jul 9, 2009
Tech Tips