Home > Ask the SQL Server Experts > Archive: Integration Services Questions & Answers > Common DBMS table and column name restrictions
Ask The SQL Server Expert: Questions & Answers
EMAIL THIS

Common DBMS table and column name restrictions

Joe Toscano EXPERT RESPONSE FROM: Joe Toscano

Pose a Question
Other SQL Server Categories
Meet all SQL Server Experts
Become an Expert for this site


Expert advice on database development
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


>
QUESTION POSED ON: 16 May 2006
What are the common name restrictions on tables and columns in a database management system (DBMS)?

>
DBMS table and column names under SQL Server 2000 have a 1 through 128-byte limit and follow the rules established for identifiers.

The first character must be one of the following:

  • A letter as defined by the Unicode Standard 2.0

  • The Unicode definition of letters includes Latin characters from A through Z in addition to letter characters from other languages.

  • The underscore (_), "at" sign (@) or number sign (#)

  • Certain symbols at the beginning of an identifier have special meaning in SQL Server. An identifier beginning with the "at" sign denotes a local variable or parameter. An identifier beginning with a number sign denotes a temporary table or procedure. An identifier beginning with double number signs (##) denotes a global temporary object.

    Some Transact-SQL functions have names that start with double at signs (@@). To avoid confusion with these functions, it is recommended that you do not use names that start with @@.

    Subsequent characters can be any of the following:

  • Letters as defined in the Unicode Standard 2.0
  • Decimal numbers from either Basic Latin or other national scripts
  • The "at" sign, dollar sign ($), number sign, or underscore
  • The identifier must not be a Transact-SQL reserved word. SQL Server reserves both the uppercase and lowercase versions of reserved words. Embedded spaces or special characters are not allowed although you will see these objects in good old Northwind with names that include embedded spaces. You'll have to access them by enclosing them in brackets.


    Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



    RELATED CONTENT
    Archive: Integration Services
    How to convert DTS packages to SSIS and overwrite data
    How to migrate DTS to SSIS and deploy SSIS packages
    Query to search text in old DTS packages in SQL Server?
    Error importing Excel data to SSIS in SQL Server 2005
    Delete .bak files automatically with CLR
    DTS package designed to overwrite extract.xls
    Displaying a SQL Server database report in Excel
    Stored procedure practices in SQL Server
    Call triggers in a stored procedure
    SQL Server permission to create jobs and schedules in SSIS

    Microsoft SQL Server Database Development
    Change tempdb from 'C' drive
    Sub-queries supported in Analysis Services MDX
    MDX functions: SCOPE, THIS and FREEZE
    More powerful Analysis Services MDX in SQL Server 2005
    Top 5 SQL Server query tips
    Update table rows in SQL Server 2000
    Delete .bak files automatically with CLR
    Conversion error in SQL Server business objects
    Syntax error in SQL Server script
    Stored procedure overview in SQL Server
    Microsoft SQL Server Database Development Research

    SQL Server Interoperability
    Utilize SSAS for data predictions and classification using Excel
    How to create a SQL Server linked server to DB2
    Export SQL Server data to an Excel file using SSIS and Visual Studio
    Performance tuning for SQL Server 2005 and Exchange running on SBS
    Custom VB.Net scripting in SQL Server Integration Services
    Can SQL Server 2000 work on Windows 2003 platform?
    Query to search text in old DTS packages in SQL Server?
    Handle slowly changing dimensions with SSIS 2005 wizard
    Run DTS packages within SQL Server Integration Services
    SQL Server Integration Services how-to

    RELATED GLOSSARY TERMS
    Terms from Whatis.com − the technology online dictionary
    CORBA  (SearchSQLServer.com)

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary



    Search and Browse the Expert Answer Center
    Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
    Browse our Expert Advice



    SQL Solutions - SQL Database Design
    HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Site Map




    All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts