Michael J. Swart

December 3, 2009

Drag a Column List From Object Explorer

Filed under: SQLServerPedia Syndication,Technical Articles — Michael J. Swart @ 1:00 am

Until today, I did not know you could do this. This article explains a tip that might be new to some others like me.

In Management Studio you can drag the Columns folder from Object Explorer into a query window and voila! You’ve got a nice comma delimited list of a table’s columns. Another drag-and-drop win!

10 second demo

10 seconds of Drag and Drop awesomeness

The old way I used to do this was to use ALT+F1 on a tablename to get its sp_help results. Then after copy-pasting the column list, I formatted the list to include commas and to take out whitespace.

The only downside to this drag-and-drop method is that you have to have object explorer expanded to the table you want to use.

But try it out. Play with it. See what other objects in the object explorer are drag-able. This is not a new idea. A quick search shows that Aaron Bertrand posted the same tip about 2 months ago. But it’s probably an idea that deserves more exposure.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress