February 16, 2006 at 7:05 am
can anyone provide me with a list of illegal characters in naming database names....
also what is the maximum no of characters?
February 17, 2006 at 6:47 am
Check out this link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/acdata/ac_8_con_03_6e9e.asp
Mattie
February 17, 2006 at 12:44 pm
Database names, and names in most (all?) system tables are stored as the sysname datatype.
From BOL:sysname is a system-supplied user-defined data type that is functionally equivalent to nvarchar(128) and is used to reference database object names.
Terry
June 14, 2021 at 5:43 am
Hello. It would be far easier to provide you with a list of legal / valid characters / code points. This is because Unicode has 1,114,112 total possible code points, and 46,543 of them are valid for identifiers (SQL Server 2005 to at least SQL Server 2019). Hence, there are 1,067,569 illegal / invalid code points (not all of those have been allocated to actual characters yet, but more are being added each year).
I posted the list of legal / valid characters here:
Of course, "valid" / "legal" characters are ones that can be used in "regular" identifiers (non-delimited identifiers). For delimited identifiers (i.e. ones that require being enclosed in either square-brackets or double-quotes), I believe all code points are legal, except U+0000 and U+FFFF.
Take care,
Solomon...
SQL# — https://SQLsharp.com/ ( SQLCLR library ofover 340 Functions and Procedures)
Sql Quantum Lift — https://SqlQuantumLift.com/ ( company )
Sql Quantum Leap — https://SqlQuantumLeap.com/ ( blog )
Info sites — Collations • Module Signing • SQLCLR
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply