SQL UPPER Function

The UPPER function converts a string to uppercase.

To convert a string to lowercase use the LOWER function.

Example

#

This example converts the input string to uppercase.

SELECT UPPER('Los Angeles') AS City
Result:  1 record
City
LOS ANGELES

Syntax

Syntax of the UPPER function.

UPPER(string)

string -- a character expression, variable, or column name to convert.


More Examples

UPPER with Table Columns

CUSTOMER
Id
FirstName
LastName
City
Country
Phone
Problem: List customers with uppercase names.
SELECT UPPER(FirstName + ' ' + LastName) AS 'Name', 
       City, Country
  FROM Customer
Result:  91 records
Name City Country
MARIA ANDERS Berlin Germany
ANA TRUJILLO México D.F. Mexico
ANTONIO MORENO México D.F. Mexico
TDOMAS HARDy London UK
CHRISTINA BERGLUND Luleå Sweden

You may also like



Guides


vsn 3.1