RIGHT()

Documentation

VoltDB Home » Documentation » Using VoltDB

RIGHT()

RIGHT() — Returns a substring from the end of a string.

Synopsis

RIGHT( string-expression, numeric-expression )

Description

The RIGHT() function returns the last n characters from a string expression, where n is the second argument to the function.

Example

The following example uses the LEFT() and RIGHT() functions to return an abbreviated summary of the Description column, ensuring the result fits within 20 characters.

SELECT product_name, 
       LEFT(description,10) || '...' || RIGHT(description,7) 
       FROM product_list ORDER BY product_name;
>