Name
LOWER and UPPER
Synopsis
The functions LOWER and UPPER allow the case of a string to be altered quickly and easily, so that all the characters are lower- or uppercase, respectively. These functions are supported in all the database implementations covered in this book. The different database platforms also support a variety of other text formatting functions that are specific to their implementation.
SQL2003 Syntax
LOWER(string
) UPPER(string
)
LOWER converts string
into a lowercase string. UPPER is the uppercase
counterpart of LOWER.
DB2 and MySQL
These platforms support the SQL2003 UPPER and LOWER scalar functions, as well as the synonyms UCASE and LCASE.
Oracle, PostgreSQL, and SQL Server
These platforms support the SQL2003 UPPER and LOWER scalar functions, as in the following example:
Example
SELECT LOWER('You Talkin To ME?'), UPPER('you talking to me?!');
you talkin to me?, YOU TALKING TO ME?!
Get SQL in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.