Skip to content

Tired of typing SQL scripts like “SELECT TOP 10 * FROM” and other similar scripts. How to create an alias/shortcut in SSMS?

While doing a lot of research at my work I keep writing generic scripts like “SELECT TOP 10 * FROM” etc.

Is there a way to for me to write something like a snippet so that when i type “ss” + Space/Tab it will insert the “SELECT TOP 10 * FROM” script?

I have a number of scripts that I’ve noticed i use a lot and i would like to create some aliases for them…



While you could create a code snippet, it is tiresome to select the snippet.

It still needs: CTRL-K CTRL-X M <tab> S <tab> to get:

SELECT TOP 10 * FROM Table1 and being able to type the needed tablename.


<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets  xmlns="">
<_locDefinition xmlns="urn:locstudio">
    <_locDefault _loc="locNone" />
    <_locTag _loc="locData">Title</_locTag>
    <_locTag _loc="locData">Description</_locTag>
    <_locTag _loc="locData">Author</_locTag>
    <_locTag _loc="locData">ToolTip</_locTag>
    <CodeSnippet Format="1.0.0">
            <Description>SELECT TOP 10 * FROM ....</Description>
                                    <ToolTip>Name of the table</ToolTip>
            <Code Language="SQL"><![CDATA[
SELECT TOP 10 * FROM  $TableName$

Saven this to (i.e.) “select.snippet”, and Import in SSMS under ‘Tools/Code Snipper Manager’

It is unclear, to me, what the section <Shortcut>select</Shortcut> has for value …

According to next site, shortcuts is a “Won’t Fix” back in 2013:

User contributions licensed under: CC BY-SA
8 People found this is helpful