Think that how many times you write “SELECT * FROM” a day.
You can select data from a table with one key Ctrl+5
Let’s create an SP under master DB. If this SP is under master DB, we can use shortcut property in all DBs.
CREATE proc sp_select
@COUNT VARCHAR(10) = NULL
IF EXISTS (SELECT NULL FROM sys.objects WHERE TYPE IN ('U','V') AND name=@TABLE_NAME)
IF @COUNT IS NULL
EXEC('select top ' + @COUNT + ' * from ' + @TABLE_NAME + '(nolock)')
print 'Table not found.'
SP is created, now we have to assign shortcut to this Stored Procedure; Tools > Options > Environment > Keyboard
We assigned “Ctrl+5” to sp_select as seen in the picture above.
Now, just write table or view name, select the text and hit Ctrl+5.
MY_TABLE_NAME --Selects TOP 1000
MY_TABLE_NAME, 50 --Selects TOP 50