Functions
RIGHT
Right portion of a string
Try it
When to use it
When should I use RIGHT instead of LEFT?
Use RIGHT when the characters you want are at the end of the text, such as a suffix, last few digits, or a trailing code.
How do I get the last few digits of an account number?
Pass the count of trailing characters you need to RIGHT, for example RIGHT(account, 4) to mask all but the last four digits.
Use cases
Get a file extension
Extract a two-letter currency suffix
Used in
Syntax
RIGHT(text, num_chars)