Revious
Revious

Reputation: 8146

SQL Server Management Studio: F4 equivalent Toad shortcut

In Toad for Oracle you can put the cursor on the name of a object and press F4 to open it's definition.

Is there anything similar in T-SQL / SQL Server Management Studio ides?

Upvotes: 3

Views: 1732

Answers (2)

Andrei Rantsevich
Andrei Rantsevich

Reputation: 2935

I have developed SSMSBoost add-in for SQL Server Management Studio and it does exactly what you want. The shortcut is F2

Upvotes: 2

Ben Thul
Ben Thul

Reputation: 32697

If you want the definition of an object, the procedure sp_helptext will give that to you. As for assigning it to a keyboard shortcut in SSMS, you can do so by going to Tools → Options → Keyboard → Query Shortcuts and assigning sp_helptext to one of the available slots. Once that's done, highlight the name of an object in your query editor window, hit the assigned shortcut and it should display the definition. As someone mentioned above, sp_help will get you different information (i.e. columns, indexes, constraints, etc) if the object is a table or a view. Luckily, the same process applies to sp_help!

Upvotes: 2

Related Questions