Sybase 12.4.2 User Manual

Page of 536
Understanding character sets in software
322
 
Sorting characters using collations
The database collation sequence includes the notion of alphabetic ordering of 
letters, and extends it to include all characters in the character set, including 
digits and space characters. 
Associating more than 
one character with 
each sort position
More than one character can be associated with each sort position. This is 
useful if you wish, for example, to treat an accented character the same as the 
character without an accent.
Two characters with the same sort position are considered identical in all ways 
by the database. Therefore, if a collation assigned the characters and e to the 
same sort position, then a query with the following search condition:
WHERE col1 = ’want’
is satisfied by a row for which 
col1
 contains the entry 
went
At each sort position, lower- and uppercase forms of a character can be 
indicated. For case-sensitive databases (the default for IQ databases created as 
of version 12.4.2), the lower- and uppercase characters are not treated as 
equivalent. For case-insensitive databases, the lower- and uppercase versions 
of the character are considered equivalent.
First-byte collation orderings for multibyte character sets
A sorting order for characters in a multibyte character set can be specified only 
for the first byte. Characters that have the same first byte are sorted according 
to the hexadecimal value of the following bytes.
International aspects of case sensitivity
Adaptive Server IQ is case preserving and case insensitive for identifiers, 
such as table names and column names. This means that the names are stored 
in the case in which they are created, but any access to the identifiers is done 
in a case-insensitive manner.
For example, the names of the system tables are held in upper case 
(SYSDOMAIN, SYSTABLE, and so on), but access is case insensitive, so that 
the two following statements are equivalent:
SELECT *
FROM systable
SELECT *
FROM SYSTABLE