Popular Posts

Thursday, November 10, 2011

Shortcut for "Select * from" in SSMS

Create the following stored procedure in your database:

----------------------

CREATE PROC sp_SelectFromTable @tbl VARCHAR (128)
AS
EXEC ('SELECT * FROM ' + @tbl )
GO

-----------------------

Now, goto Tools->Options->Environment->Keyboard
and place the spname "sp_SelectFromTable" against a shortcut key combination you'd like

I prefer Ctrl + 5.

No comments:

Post a Comment

Total Pageviews