RIGHT()
Extracts the rightmost part of a string
VARCHAR
or BLOB
RIGHT (string, length)
Parameter | Description |
---|---|
string |
An expression of a string type |
length |
Integer.The number of characters to return |
-
This function supports text
BLOB
s of any length. -
If string is a
BLOB
, the result is aBLOB
.Otherwise, the result is aVARCHAR(n)
with n the length of the input string. -
If the length argument exceeds the string length, the input string is returned unchanged.
-
If the length argument is not a whole number, bankers' rounding (round-to-even) is applied, i.e. 0.5 becomes 0, 1.5 becomes 2, 2.5 becomes 2, 3.5 becomes 4, etc.
Warning
|
When used on a |