Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » UltraLite - Database Management and Reference » UltraLite SQL Function Reference » Alphabetical list of functions

REPLICATE function [String] Next Page

RIGHT function [String]


Returns the rightmost characters of a string.

Syntax

RIGHT( string-expression, integer-expression )

Parameters

string-expression    The string to be left-truncated.

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

Remarks

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.

You can specify an integer-expression that is larger than the value in the column. In this case, the entire value is returned.

Whenever possible, if the input string uses character length semantics the return value will be described in terms of character length semantics.

See also
Standards and compatibility
Example

The following statement returns the last 5 characters of each Surname value in the Customers table.

SELECT RIGHT( Surname, 5) FROM Customers;