dbTalk Databases Forums  

questions about contrains in table names....

comp.database.ms-sqlserver comp.database.ms-sqlserver


Discuss questions about contrains in table names.... in the comp.database.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
genc_ymeri
 
Posts: n/a

Default questions about contrains in table names.... - 04-15-2005 , 01:48 PM






Hi,
We are a team that are developing a projet which has in itself a good number of tables in sql server (not temporary ones !). The entire team is pretty knowledgeable in MSSQL server and in SQL programming in general.... However we kind of want to double check what are the limitations of naming tables (not temporary ones ! "#"). ?

e.g

1. Any limit of the length of the characters in table name ?
2. Any special characters which are not allowed or is not advised to be in a table name ?
3. or any other constrains or limitations I can't think of now.

Thank you very much in advance,

G.Y
Software Engineer,
QuadraMed, Reston VA

Reply With Quote
  #2  
Old   
Jens Süßmeyer
 
Posts: n/a

Default Re: questions about contrains in table names.... - 04-15-2005 , 01:52 PM






Take a look here:

http://weblogs.asp.net/jamauss/artic...nventions.aspx


HTH, Jens Süßmeyer.

---
http://www.sqlserver2005.de
---
"genc_ymeri" <genc_ymeri (AT) hotmail (DOT) com> schrieb im Newsbeitrag news:h9-dnVFqld22kf3fRVn-jQ (AT) adelphia (DOT) com...
Hi,
We are a team that are developing a projet which has in itself a good number of tables in sql server (not temporary ones !). The entire team is pretty knowledgeable in MSSQL server and in SQL programming in general.... However we kind of want to double check what are the limitations of naming tables (not temporary ones ! "#"). ?

e.g

1. Any limit of the length of the characters in table name ?
2. Any special characters which are not allowed or is not advised to be in a table name ?
3. or any other constrains or limitations I can't think of now.

Thank you very much in advance,

G.Y
Software Engineer,
QuadraMed, Reston VA

Reply With Quote
  #3  
Old   
Hugo Kornelis
 
Posts: n/a

Default Re: questions about contrains in table names.... - 04-15-2005 , 03:50 PM



(Rogue group microsoft.public.sqlserver removed from crosspost)

On Fri, 15 Apr 2005 14:48:11 -0400, genc_ymeri wrote:

Quote:
Hi,
We are a team that are developing a projet which has in itself a good number of tables in sql server (not temporary ones !). The entire team is pretty knowledgeable in MSSQL server and in SQL programming in general.... However we kind of want to double check what are the limitations of naming tables (not temporary ones ! "#"). ?

e.g

1. Any limit of the length of the characters in table name ?
2. Any special characters which are not allowed or is not advised to be in a table name ?
3. or any other constrains or limitations I can't think of now.

Thank you very much in advance,

G.Y
Software Engineer,
QuadraMed, Reston VA
Hi G.Y.,

Table names must adhere to the rules for regular identifiers. Here's a
copy and paste from Books Online:

=== start copied text ===

Rules for Regular Identifiers
The rules for the format of regular identifiers are dependent on the
database compatibility level, which can be set with sp_dbcmptlevel. For
more information, see sp_dbcmptlevel. When the compatibility level is
80, the rules are:

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 and 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:
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.
When used in Transact-SQL statements, identifiers that fail to comply
with these rules must be delimited by double quotation marks or
brackets.

=== end copied text ===

The maximum length of table names can also be found in Books Online, in
the Maximum Capacity Specifications:

Identifier length (in characters) 128

Best, Hugo
--

(Remove _NO_ and _SPAM_ to get my e-mail address)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.