Here’s a SQL Server Tip



If you've enjoyed reading this post then please subscribe to my Full Text RSS Feed.

How many times have you asked this question when you run a query. How do I copy the query result with the column names into Microsoft Excel?

In the SQL Server Management Studio, in the Tools menu, select Tools > Options > SQL Server > Results to Grid

Then check the Include column headers when copying or saving the results checkbox and click on OK.

That’s it. The next time you run a query, copy the query result, paste in Excel and voila, the column names are pasted together with the data.

Sphere: Related Content

Related Posts

About the Author

a tech junkie and a software developer. a apple fan and an avid photographer. a frequent traveller and loves art and graphic novels. My Google+