Valid Characters in Object Names
The names of databases, tables, other objects or performance groups specified in the CHECK command can consist of the following inclusive characters:
Special characters … |
Include … |
Parentheses, braces, and brackets |
( ) (parentheses)
{ } (curly braces)
[ ] (square brackets)
< > (angle brackets)
|
Punctuation marks |
` (grave accent)
! (exclamation point)
; (semicolon)
: (colon)
' (apostrophe)
? (question mark)
. (period)
, (comma)
|
Other |
| (vertical line)
~ (tilde)
@ (at sign)
$ (dollar sign)
= (equals sign)
+ (plus)
# (number sign)
^ (circumflex accent or caret)
& (ampersand)
* (asterisk)
- (hyphen-minus)
_ (low line or underscore)
/ (forward slash)
\ (backward slash)
|
You must specify any name containing one or more special characters or blank spaces within apostrophes or double quotation marks, except for the following:
?
(question mark)
$
(dollar sign)
_
(low line or underscore)
[ ]
(square brackets)
#
(number sign)
Note: A name cannot begin with a digit (0
… 9
).
For more information on creating names, see “Basic SQL Syntax and Lexicon” in SQL Fundamentals.
Examples
The following examples show valid database or table names:
Table1
MYTABLE10
$$MyAccount
#Your_Account_$100
%mydatabase?
???
The following examples show irregular but acceptable names:
'123'
“First&Second table”
my db1'
The following examples show unacceptable and non-valid names:
123
First&Second table
my db1