login

SQL UPPER and LOWER Functions

SQL Upper function allow you to convert all characters in a string into uppercase. Otherwise SQL lower function allow you to convert all characters in a string into lowercase. Here is an example of using SQL upper an lower functions:

SELECT UPPER('Upper'), 
       LOWER('Lower')

And the output is:

In some RDBMS upper and lower functions are implements as UCASE or LCASE such as IBM DB2. MySQL also use UCASE and LCASE as synonyms.

UPPER('Upper')  LOWER('Lower')
--------------  --------------
UPPER           lower