UPPER

Converts characters in a string to upper case

See also: LOWER

Syntax

UPPER( expr )

Arguments

Parameter

Description

expr

String expression

Returns

Returns the same type as the argument supplied.

Notes

  • If the value is NULL, the result is NULL.

Examples

For these examples, consider the following table and contents:

CREATE TABLE jabberwocky(line TEXT);

INSERT INTO jabberwocky VALUES
   ('''Twas brillig, and the slithy toves'), ('      Did gyre and gimble in the wabe:')
   ,('All mimsy were the borogoves,'), ('      And the mome raths outgrabe.')
   ,('"Beware the Jabberwock, my son!'), ('      The jaws that bite, the claws that catch!')
   ,('Beware the Jubjub bird, and shun'), ('      The frumious Bandersnatch!"');

Upper-casing a literal value

SELECT UPPER('blue');
BLUE

Upper-casing a column of values

SELECT UPPER(line) FROM jabberwocky;
upper
-----------------------------------------
'TWAS BRILLIG, AND THE SLITHY TOVES
DID GYRE AND GIMBLE IN THE WABE:
ALL MIMSY WERE THE BOROGOVES,
AND THE MOME RATHS OUTGRABE.
"BEWARE THE JABBERWOCK, MY SON!
THE JAWS THAT BITE, THE CLAWS THAT CATCH!
BEWARE THE JUBJUB BIRD, AND SHUN
THE FRUMIOUS BANDERSNATCH!"