Custom SSMS Shortcuts for ETL Developer
You can save up to 90% of your time if you invoke the most commonly used SQL query, SELECT FROM, with a keyboard shortcut strike. To apply this simple but often overlooked technique, first assign a keyboard shortcut to the query in SQL Server Management Studio.1. Create a Stored Procedure for SELECT Statement
Execute the following code to create a stored procedure:
-----------------------------------------------------------------------------------------------------
CREATE PROCEDURE dbo.sp_select
@tablename NVARCHAR(200)
AS
DECLARE @cmd NVARCHAR (255)
SET @cmd = 'SELECT TOP 50 * from ' + @tablename
EXEC sp_executesql @cmd
GO
-------------------------------------------------------------------------------------------------------
Limiting the result set to a few top records minimizes impact on performance.
2. Create a Keyboard Accelerator for a Stored Procedure
To create a keyboard accelerator for a stored procedure:
- On the Tools menu, click Options.
- On the Keyboard page, select Ctrl+F1 or other unused keyboard combination in the Shortcut list.
- In the Stored Procedure box, type the stored procedure name sp_select, and then click OK
Note. You need to close SSMS and re-open it to make the shortcut setting effective.
3. Get SELECT Query Results with a Keyboard Shortcut Stroke
To execute SELECT statement with a keyboard shortcut:
Nice Work Bro..
ReplyDelete