602SQL Documentation Index  

Character Conversion Functions UPPER and LOWER (

UPPER(str)  
LOWER(str)

The UPPER and LOWER functions do the conversion of a CHAR, CLOB, NCHAR or NCLOB type string str into uppercase or lowercase. If the charset is chosen correctly for the string to be converted, international characters will be converted as well.

The function value will be the same value type as str.

Variations from Intermediate to Full Level

Example:

A trigger that ensures that the name column in the Companies table will be in uppercase when inserting a new record.

TRIGGER Uppercase AFTER INSERT ON Companies
REFERENCING NEW ROW AS newrow
FOR EACH ROW
BEGIN
 SET newrow.name=UPPER(newrow.name);
END