upper and lower functions
The
upper
and lower
are simple functions to
convert to fully upper case or lower case respectively. The
upper
function converts all the characters in a
string to uppercase. Thelower
function converts all the
characters in a string to
lowercase.returnvalue upper (source)
returnvalue lower (source)
source ::= any*
returnvalue ::= string
Example 1: Fetch the full name of the passenger in uppercase whose
ticket number is
1762376407826.
SELECT upper(fullname) AS FULLNAME_CAPITALS
FROM BaggageInfo
WHERE ticketNo=1762376407826
Output:
{"FULLNAME_CAPITALS":"DIERDRE AMADOR"}
Example 2: Fetch the full name of the passenger in lowercase whose
ticket number is
1762376407826.
SELECT lower(fullname) AS fullname_lowercase
FROM BaggageInfo WHERE ticketNo=1762376407826
Output:
{"fullname_lowercase":"dierdre amador"}