Reference Guide > TDV Support for SQL Functions > TDV-Supported Character Functions > LOWER
 
LOWER
The LOWER function makes all the alphabetical characters in a given string lowercase. It can be used to format output, or to make case-insensitive comparisons.
Syntax
LOWER (string)
Remarks
The input string must be enclosed within single-quotes.
If the input is an empty string, the output is also an empty string.
If the input contains only space characters enclosed in single-quotes, it is not empty, and LOWER does not turn it into an empty string.
The following table lists the input types that you can use in LOWER, and their corresponding output types.
Data Type of string
Output Type
CHAR, LONGVARCHAR, STRING, VARCHAR
Same as the input type; for example, if the input is of type VARCHAR, the output is also of type VARCHAR.
NULL
NULL
Example (With a Comparison)
SELECT ContactLastName AS Name
FROM /shared/examples/ds_orders/customers
WHERE LOWER (ContactLastName) LIKE '%Ho%';
 
This example would convert all the letters in a ContactLastName to lowercase and pull out all the names from the table customers containing the sequence ho, such as:
Howard
Honner
Nicholson
Thompson
Example (Other Contexts)
SELECT LOWER (products.ProductName) Name,
LOWER ('YOU') Expr4,
LOWER (' ') Expr6,
LOWER ('YoU 9 fEEt') Expr2,
LOWER (NULL) Expr1
FROM /shared/examples/ds_inventory/products products