• Raghavendra Mudugal (8/21/2014)


    TomThomson (8/21/2014)


    twin.devil (8/21/2014)


    Just for the information.

    Becuase #table names max length is only 116 characters in SQL Server 2008 r2. its also valid of SQL SERVER 2012.

    It's valid in every version from SQL Server 2005 to SQL Server 2014 inclusive. Probably in SQL Server 2000 too, but I haven't kept a copy of the transact-sql reference for SQL Server 2000 so I'm only 99.5% certain of that.

    .

    yup, its confimed.

    text from sql server 2000 help file (from the CREATE TABLE statement)

    table_name

    Is the name of the new table. Table names must conform to the rules for identifiers. The combination of owner.table_name must be unique within the database. table_name can contain a maximum of 128 characters, except for local temporary table names (names prefixed with a single number sign (#)) that cannot exceed 116 characters.

    Nice Find.

    IMHO - that needs to be updated so a temp table can be 128 characters too.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events