Defining Custom Shortcuts

Defining Custom Shortcuts

SQL Server 2000

SQL Query Analyzer supports customizable keyboard shortcuts used to execute Transact-SQL statements. The following predefined key combinations cannot be modified:

Key Combination Definition
ALT+F1 sp_help
CTRL+1 sp_who
CTRL+2 sp_lock

To define query shortcuts

  1. On the Tools menu, click Customize.

  2. In the Customize dialog box, click the Custom tab.

  3. Type the Transact-SQL statement to be executed in the column next to a key combination. The statement can be a maximum of 1,024 characters in length.

    For example, the following code executes the sp_autostats stored procedure to enable autostatistics for the Customers table in the Northwind database.

    USE Northwind EXEC sp_autostats 'Customers', 'ON'
    

    This example executes a SELECT statement against the Customers table.

    SELECT * from Northwind..Customers
    

To remove all modifiable shortcuts

  • Click Reset All.
Show:
© 2016 Microsoft