SQL-J Language Reference
Page 74 of 121

LOWER

LOWER takes a character expression as a parameter and returns a string in which all alpha characters have been converted to lowercase.

Because all built-in data types are implicitly converted to strings, this function can act on all built-in data types.

Syntax

LOWER ( CharacterExpression )

A CharacterExpression is a CHAR, VARCHAR, or LONG VARCHAR data type (or international counterpart), any built-in type that is implicitly converted to a string (except a bit expression), or any Java data type that directly maps to a built-in type that is implicitly converted to a string.

If the parameter type is CHAR or LONG VARCHAR, the return type is CHAR or LONG VARCHAR. Otherwise, the return type is VARCHAR.

The length and maximum length of the returned value are the same as the length and maximum length of the parameter.

If the CharacterExpression evaluates to null, this function returns null.

NOTE: UPPER and LOWER follow the database locale. See International String Data Types for more information.

LOWER Examples

-- returns 'asd1#w'
VALUES LOWER('aSD1#w')

-- returns null if the column stores a null value
SELECT LOWER(hotel_name) FROM Hotels

SELECT LOWER(flight_id.toString()) FROM Flights