|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Naming a databaseI am doing some testing on a database created by the programming dept of the
company, they named the database '123v10'. When I run some queries (mostly admin stuff, checking the fragmentation, space used by the data and log files, etc) in the Query Analyzer, I often get the error message: Line 1: Incorrect syntax near '123'. My guess is that SQL doesn't particularly like database names that start with numbers, am I correct? If so, will this create any real problems down the line? I think we are at an early enough stage that the database could be renamed if this would help. TIA, Nancy L Hi
According to the rules for regular identifiers (from the SQL Server 2005 BOL), a number can not be used as a valid first character: The first character must be one of the following: A letter as defined by the Unicode Standard 3.2. The Unicode definition of letters includes Latin characters from a through z, from A through Z, and also letter characters from other languages. Subsequent characters can include the following: Letters as defined in the Unicode Standard 3.2. Decimal numbers from either Basic Latin or other national scripts. Regards -------------------------------- Mike Epprecht, Microsoft SQL Server MVP Zurich, Switzerland IM: m***@epprecht.net MVP Program: http://www.microsoft.com/mvp Blog: http://www.msmvps.com/epprecht/ Show quote "Nancy Lytle" <lyt***@mdon-line.com> wrote in message news:%23Q1VX9x$FHA.2156@TK2MSFTNGP11.phx.gbl... >I am doing some testing on a database created by the programming dept of >the company, they named the database '123v10'. > When I run some queries (mostly admin stuff, checking the fragmentation, > space used by the data and log files, etc) in the Query Analyzer, I often > get the error message: > Line 1: Incorrect syntax near '123'. > > My guess is that SQL doesn't particularly like database names that start > with numbers, am I correct? If so, will this create any real problems > down the line? I think we are at an early enough stage that the database > could be renamed if this would help. > > TIA, > Nancy L > |
|||||||||||||||||||||||