Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 



RIGHT Function

Description

The RIGHT function returns a length number of characters from the rightmost of a string. If any of the arguments is NULL, NULL is returned. If a value greater than the length of the string or a negative number is specified for a length, the entire string is returned.

To extract a length number of characters from the leftmost of the string, use the LEFT Function.

Syntax

RIGHT( string , length )

 

string :

character string

NULL

 

length :

INT

NULL

Example

SELECT RIGHT('CUBRID', 3);

 right('CUBRID', 3)

======================

  'RID'

 

SELECT RIGHT ('CUBRID', 10);

 right('CUBRID', 10)

======================

  'CUBRID'