BYTE function
Syntax
BYTE (expression)
Description
In NLS mode, use the BYTE function to generate a byte from the numeric value of expression. BYTE returns a string containing a single byte.
If expression evaluates to a value in the range 0 to 255, a single-byte character is returned. If expression evaluates to a value in the range 0x80 to 0xF7, a byte that is part of a multibyte character is returned.
If NLS is not enabled, BYTE works like the CHAR function.
Example
When NLS is enabled, the BYTE and CHAR functions return the following:
- BYTE(32)
- Returns a string containing a single space.
- CHAR(32)
- Returns a string containing a single space.
- BYTE(230)
- Returns a string containing the single byte 0xe6.
- CHAR(230)
- Returns a string containing the multibyte characters æ (small ligature Æ).