Data and Language Characters

The characters recognized by SAP ASE are limited in part by the language of the installation and the default character set.

Therefore, the characters allowed in SQL statements and in the data contained in the server vary from installation to installation and are determined in part by definitions in the default character set.

SQL statements must follow precise syntactical and structural rules, and can contain operators, constants, SQL keywords, special characters, and identifiers. Identifiers are database objects within the server, such as database names or table names. Naming conventions vary for some parts of the SQL statement. Operator, constants, SQL keywords, and Transact-SQL extensions must adhere to stricter naming restrictions than identifiers, which themselves cannot contain operators and special characters. However, identifiers, the data contained within the server, can be named following more permissive rules.

SQL Data Characters

The set of SQL data characters is the larger set from which both SQL language characters and identifier characters are taken. Any character in an SAP ASE character set, including both single-byte and multibyte characters, can be used for data values.

SQL Language Characters

SQL keywords, Transact-SQL extensions, and special characters, such as the comparison operators > and <, can be represented only by 7-bit ASCII values A – Z, a – z, 0 – 9, and certain ASCII characters.

These are the ASCII characters used in SQL:

Character

Description

;

(semicolon)

(

(open parenthesis)

)

(close parenthesis)

,

(comma)

:

(colon)

%

(percent sign)

-

(minus sign)

?

(question mark)

(single quote)

"

(double quote)

+

(plus sign)

_

(underscore)

*

(asterisk)

/

(slash)

(space)

<

(less than operator)

>

(greater than operator)

=

(equals operator)

&

(ampersand)

|

(vertical bar)

^

(circumflex)

[

(left bracket)

]

(right bracket)

@

(at sign)

~

(tilde)

!

(exclamation point)

$

(dollar sign)

#

(number sign)

.

(period)