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?
- Open Tools menu
- Open Options...
- Expand Query Results
- Expand SQL Server
- Expand Results to Grid
- 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.
Results with headers was added in SSMS 2008. Ctrl-Shift-C works as well.
You can just right click the results, and select "Copy with headers"
精彩评论