RIGHT function [String]

Function

Returns the rightmost characters of a string.

Syntax

RIGHT ( string-expression, numeric-expression )

Parameters

string-expression The string to be left-truncated.

numeric-expression The number of characters at the end of the string to return.

Example

The following statement returns the value olate.

SELECT RIGHT( 'chocolate', 5 ) FROM iq_dummy

Usage

If the string contains multibyte characters, and the proper collation is being used, the number of bytes returned may be greater than the specified number of characters.

Standards and compatibility

See also

“LEFT function [String]”

Chapter 11, “International Languages and Character Sets” in the Sybase IQ System Administration Guide