SQL SERVER – Query Analyzer Shortcuts

Download Query Analyzer Shortcuts (PDF)

ALT+BREAKCancel a queryCTRL+SHIFT+F2Clear all bookmarks
ALT+F1Database object informationCTRL+SHIFT+INSERTInsert a template
ALT+F4ExitCTRL+SHIFT+LMake selection lowercase
CTRL+ASelect allCTRL+SHIFT+MReplace template parameters
CTRL+BMove the splitterCTRL+SHIFT+POpen
CTRL+CCopyCTRL+SHIFT+RRemove comment
CTRL+DDisplay results in grid formatCTRL+SHIFT+SShow client statistics
CTRL+DeleteDelete through the end of the lineCTRL+SHIFT+TShow server trace
CTRL+EExecute queryCTRL+SHIFT+UMake selection uppercase
CTRL+FFindCTRL+TDisplay results in text format
CTRL+F2Insert/remove bookmarkCTRL+UChange database
CTRL+F5Parse query and check syntaxCTRL+WWindow selector
CTRL+GGo to lineCTRL+XDelete
CTRL+IIndex Tuning WizardF1Help for Query Analyzer
CTRL+KDisplay/hide execution planF2Move to next bookmark
CTRL+LDisplay execution planF3Repeat last search
CTRL+NNew query windowF4Object Search
CTRL+OConnectF5Execute a query
CTRL+PPrintF6Switch between query and result panes
CTRL+RShow/Hide results paneF8Show/hide Object Browser
CTRL+SSaveSHIFT+F1Transact-SQL help
CTRL+SHIFT+0Show optionsSHIFT+F2Move to previous bookmark
CTRL+SHIFT+CComment out codeSHIFT+TABDecrease indent
CTRL+SHIFT+DELClear the active Editor paneSHIFT+F6Switch panes
CTRL+SHIFT+FSave results to fileTABIncrease indent

Download the PDF

Reference: Pinal Dave (https://blog.sqlauthority.com), MSDN

SQL Download, SQL Shortcut, SQL Utility
Previous Post
SQL SERVER – Query to find number Rows, Columns, ByteSize for each table in the current database – Find Biggest Table in Database
Next Post
SQL SERVER – SQL Joke, SQL Humor, SQL Laugh

Related Posts

36 Comments. Leave new

  • Munna Sarfraz Ahmad
    September 17, 2007 4:01 am

    Hi All,

    “ISQLW” is the short cut to launch SQL Query analyzer,
    Just Type ISQLW in Run Command, It will open Query analyzer.

  • for sql server 2005 wt is the shortcut for isqlw ?

  • ssmsee – this is the command line shrt cut for management studio.(SQL Server 2005)

    Cheers !

  • The shortcut for isqlw in SQL2005 is :-SqlWb

  • for sql server 2005 wt is the shortcut for isqlw ?

  • vempalli sasireddy
    April 2, 2008 4:30 pm


    This is simply super.I to maximum use key board Shorts.I knew one thing from you.

  • queryanalyzer

    2000 – isqlw
    2005 – sqlwb
    2008 – ssms

  • Hi,

    I have used ALT + F1 and its really good habit to use it while working.

    I have one query here with table with schema,

    I have table named [Product].[DetailTable] where product is my schema instead of dbo

    I can execute this query
    SELECT * FROM [Product].[DetailTable]

    but when I go to use ALT + F1

    it gives error like – “Incorrect syntax near ‘.’.”

    Any idea?

  • one more thing, I can execute sp_helptext with any object ow dbo but

    if i go for sp_helptext Product.DetailTable

    It will give same error.



  • sqlwb is not a shortcut for Query Analyzer in SQL Server 2005. It opens the Management Studio which in my view is far slower than Query Analyzer in editing and manipulating queries.
    Why they chose to remove a quick solid working program I cannot understand.
    How do you even format your queries in Management Studio?
    For me it does not accept tabs and will reformat as soon as I execute.

  • Praveen Barath
    April 28, 2008 6:00 pm

    Hi Robert,

    MSSQL server 2005 is a database platform , Platform because from one window you can connect to any of MSSQL services like SSMS, SSRS,SSIS,SSAS..etc.

    I am coming to your doubt why they shifted to SSMS as it s far slow.

    As the matter of fact MSSQL 2005 is more graphical more user friendly and handy tool, I hope once you will aware of all SSMS functionality or new feature you might change your views, I agree it require more hardware recourses like RAM, 500 MB Min, and 1000 Mb Recommended rest depends on your work load. Also I feel you would be more contented with 2000 but still there are new upcoming DBA’s which require these sort of user friendly interface.(If still you face slowness check your settings and resourses.)

    Shortcut Doubts:

    2000 – isqlw –To open a query analyzer in 2000

    2005 – sqlwb—To open SSMS in 2005 (Not Query analyzer For New Query use Alt+N)

    2005 –ssmsee—TO open SSMS in 2005 (Express Edition)

    Rest of the short cuts you can check as Pinal already discussed in the top of the blog.


    Praveen Barath

    SSMS- Sql server management studio

  • Praveen Barath
    April 28, 2008 6:03 pm

    The most commonly used keyboard shortcuts in the SQL Server Management Studio (SSMS).

    Run and then SqlWb.exe to launch SQL Server Management Studio

    Results in Grid
    Ctrl + D

    Change database
    Ctrl + U

    Results in Text
    Ctrl + T

    Execute Query
    Ctrl + E or F5

    Show/Hide Object browser
    F8 (Auto Hide has to be enabled)

    New Query Window
    Ctrl + Q

    New Query with New Connection
    Ctrl + N (Then selecting SQL Server Query template)

    Open a .SQL Script file
    Ctrl + O

    Full Screen
    Shift + Alt + Enter

    Parse the query
    Ctrl + F5

    Show/Hide Results Pane
    Ctrl + R

    Switch between query and results panes

    Information about all the objects in the current database
    Alt + F1

    Praveen Barath

  • Hi Guys,

    This is very useful resource while handling Query Analyzer Very Effectively. Thanks.

  • Dave,
    You forgot to mention ALT + X = Execute. It’s one of my favorite short cut.


  • I was creating a table name ContactForm and then i inserted values in the table but its gives an error—— please see the details—————-

    CREATE TABLE [dbo].[ContactForm] (
    [Cust_Id] [int] PRIMARY KEY NOT NULL,
    [Name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [Address] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [City] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [State] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [Country] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [Contact_No] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [E_mail] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [Company] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [Job_Title] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [Relation] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [Abt_us] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [Msg] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    ) ON [PRIMARY]

    Values insertion:
    Insert into ContactForm Values (1, ‘Saurabh Verma’,’18/271, Behron Gali, Maithan’, ‘Agra’,
    ‘Uttar Pradesh’, ‘India’, 09319394568, ‘iamsaurabhverma@gmail.com’, ‘Image Software’,
    ‘Web Developer & Designer’, ‘Employee’, ‘Events’, ‘Please Reply’)

    Msg 8152, Level 16, State 14, Line 1
    String or binary data would be truncated.
    The statement has been terminated.

    Please give me suggestions

  • Imran Mohammed
    July 29, 2008 7:40 am


    in Your table 10th column which is job_title is defined to take not more than 20 characters, but in your insert statement you are trying to insert 24 characters which is “Web Developer & Designer”. That is why insert statement is failing.

    Solution for this problem is either change the max size of the job_title column to 50 or make the value of that column small example : “Web Devp & Designer.”

    Hope this helps.


  • Thanks Mr Imran for your kind help………..

  • Dear All,

    please help me out for restoring the database for sql 2000, i m getting error ” database is already in use” when i try to do the restore.

    please help me to get the command to stop the database.



  • Hi Rehan,

    Can you recheck whether the database existed with same (the db name which you want restore). if not found in Enterprise Manager, Enter the command as Use DBNAME in Query Analyzer.

    If found in Enterprise Manager, check query analyzer opened with the that Data base. close the query analyzer and delete the exist data base.

    If still also not able to delete, clear the connections in detach window and delete the .mdf & log files in the specified path.

    Hope it will solve.


  • I have been using SQL Server 2000 for several years and I have used DTS to import and export data between internal and external tables.

    Recently I installed SQL Server 2005 “Developer” and can not find DTS.

    Any suggestions? Thanks


Leave a Reply