SQL Query Analyzer Templates

  • This may be a dumb question, but I just can't find the answers in BOL so I'm asking here...

    When you open a template like "Create Table ...", the script is like this:

    create table <table_name, sysname, test_table> (

    <column_1, sysname, c1> <datatype_for_column_1, , int> IDENTITY(<seed, , 100>, <increment, , 1>),

    <column_2, sysname, c2> <datatype_for_column_2, , int> NOT NULL)

    GO

    What's all that extra stuff? I always just delete all of them and go with the regular:

    create table suppliers (

    column1 int IDENTITY (100, 1),

    column2 varchar (20)

    )

    Just wondering... thanks 🙂

  • Query Analyzer can give you a GUI based interfaced when dealing with templates. It then takes the answers and fills them into the template for you.

    K. Brian Kelley

    http://www.truthsolutions.com/

    Author: Start to Finish Guide to SQL Server Performance Monitoring

    http://www.netimpress.com/

    K. Brian Kelley
    @kbriankelley

  • Press Ctrl+Shift+M and it will prompt you to replace all of the variables inside the <> like <table_name>

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply