Skip to content

Returns the rightmost len characters from the string str, or NULL if any argument is NULL.

func.right(<str>, <len>)
func.right('foobarbar', 4)
┌────────────────────────────┐
│ func.right('foobarbar', 4) │
├────────────────────────────┤
│ rbar │
└────────────────────────────┘
RIGHT(<str>, <len>);
ArgumentsDescription
<str>The main string from where the character to be extracted
<len>The count of characters

VARCHAR

SELECT RIGHT('foobarbar', 4);
┌───────────────────────┐
RIGHT('foobarbar', 4) │
├───────────────────────┤
│ rbar │
└───────────────────────┘