Saturday, December 30, 2017

Sql Server Management Studio - Column names retrieval

One of the most common things that I do in Sql Server Management Studio, is to get all the column names from a certain table. To achieve that I navigate through the Object Explorer, select my desired table and then script its create statement. I have to admit its quite annoying and I have been doing this since... forever actually.

So, today while I was staring at the screen, I kinda played with the mouse dragging & dropping stuff from the Object Explorer to the Query Window and to my amazement I had accomplished the impossible. I had all the column names in my query window without any effort! Who could imagine that you can simply drag and drop the Columns folder of a certain table into the Query Window and voila! You can now have all column names without cutting and pasting from create statements scripts, etc. 



Rethinking the whole process, it seems very obvious as an action. However, I never thought that it could work and neither did my colleagues :D.

Did you know that you could do that in Sql Server Management Studio ? Do you have any tricks & trips you would like to share ?

No comments:

Post a Comment