RIGHT
Returns the rightmost count of characters of string_exp.
Syntax
RIGHT ( string_exp , count )
|
Notes
![*](bullet.png)
The
string_exp can be fixed‑length or variable‑length
CHARACTER data types.
![*](bullet.png)
The
count can be
INTEGER,
SMALLINT, or
TINYINT data types.
![*](bullet.png)
If any of the arguments of the expression evaluate to
NULL, the result is
NULL.
![*](bullet.png)
If
count is negative, the result evaluates to
NULL.
string_exp and the result can contain multi‑byte characters.
count represents the number of characters.
Example
This example illustrates the RIGHT function, selecting the rightmost six letters from the string ‘Afghanistan':
SELECT RIGHT(fld1,6) FROM test100 WHERE fld1 = 'Afghanistan';
RIGHT(FLD1,6)
---------------
nistan
1 record selected
|
Compatibility
ODBC compatible