webCOMAND

RIGHT()

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

Prototype

string RIGHT(string str, int length)

Parameters

  • str - Original string to trim.
  • length - Length of str to be returned from the right.

Return

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

Example

SELECT RIGHT(Username, 10) AS UsernameLastTen FROM User

Related

LEFT()