LEFT()

Documentation

VoltDB Home » Documentation » Using VoltDB

LEFT()

LEFT() — Returns a substring from the beginning of a string.

Synopsis

LEFT( string-expression, numeric-expression )

Description

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

Example

The following example uses the LEFT function to return an abbreviation (the first three characters) of the product category as part of the SELECT expression.

SELECT LEFT(category,3), product_name, price FROM product_list
    ORDER BY category, product_name;
>