Articles with the tag:
Close
Changelog
Close
Articles with the tag:
Close
Try in the cloud
Try in the cloud

RIGHT/RIGHTB Function

The RIGHT/RIGHTB function is one of the text and data functions. Is used to extract a substring from a string starting from the right-most character, based on the specified number of characters. The RIGHT function is intended for languages that use the single-byte character set (SBCS), while RIGHTB - for languages that use the double-byte character set (DBCS) like Japanese, Chinese, Korean etc.

Syntax

RIGHT(text, [num_chars])

The RIGHT function has the following arguments:

Argument Description
text A string you need to extract the substring from.
num_chars A number of the substring characters. It must be greater than or equal to 0. It is an optional argument. If it is omitted, the function will assume it to be 1.

RIGHTB(text, [num_bytes])

The RIGHTB function has the following arguments:

Argument Description
text A string you need to extract the substring from.
num_bytes A number of the substring characters, based on bytes. It is an optional argument.

Notes

How to apply the RIGHT/RIGHTB function.

Examples

The figure below displays the result returned by the RIGHT function.

RIGHT Function

Return to previous page
Try now for free Try and make your decision No need to install anything
to see all the features in action