SQL Server Management Studio is an interesting tool. The more you work, the more you discover tricks from it. It doesn’t come as a surprise to how I get to know something new whenever I talk with someone. People have figured out new ways to work with SSMS. In this blog, let me talk about something interesting that has been with SSMS for ages but lesser known. Let us see today a time about SSMS related to Drag and Drop Capability.
I saw something interesting when someone was showing me how they were doing documentation of their databases. The person wanted to get the names of tables, columns, constraints etc. These are simple requirements; they were using DMVs to get the same. You can surely use sys.tables, sys.columns etc to get the same.
The lesser known fact is that we can still get this information directly from the SSMS studio. The way you can do the same if to select the table name and drag it to command window and it would bring the name of the table. Similar activity can be done for Column, Constraints etc.
A sample output is being shown below.
I am showing the output based on SQL Server 2016 Management Studio currently. Having said that, I found that when you drag the Keys column, I don’t get the comma separated values. I don’t know if this is a bug, but I am sure this would be corrected in future releases once MS knows the same. Let me know what you think about this tip related drag and drop capability of SQL Server.
Do let me know if you have ever used this feature at work? If you found anything interesting using SSMS, do send me a note. I would love to share the same via blogs. Use the comments below to talk about it. I sincerely believe that the best way we learn is by sharing.
Reference: Pinal Dave (https://blog.sqlauthority.com)
I noticed that when I am in SSMS and if I already have my query I can highlight any object table or view and Press Alt + F1 it gives me all the details I need about that object.
Thank you, it is a neat trick.