Oracle9i SQL Reference Release 1 (9.0.1) Part Number A90125-01 |
|
Functions, 18 of 166
chr::=
chr
CHR
returns the character having the binary equivalent to n in either the database character set or the national character set.
If USING
NCHAR_CS
is not specified, this function returns the character having the binary equivalent to n as a VARCHAR2
value in the database character set.
If USING
NCHAR_CS
is specified, this function returns the character having the binary equivalent to n as a NVARCHAR2
value in the national character set.
The following example is run on an ASCII-based machine with the database character set defined as WE8ISO8859P1:
SELECT CHR(67)||CHR(65)||CHR(84) "Dog" FROM DUAL; Dog --- CAT
To produce the same results on an EBCDIC-based machine with the WE8EBCDIC1047 character set, the first example above would have to be modified as follows:
SELECT CHR(195)||CHR(193)||CHR(227) "Dog" FROM DUAL; Dog --- CAT
The following example uses the UTF8 character set:
SELECT CHR (50052 USING NCHAR_CS) FROM DUAL; CH -- Ä
|
![]() Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|