Dofactory.com
Dofactory.com
Earn income with your data and sql skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

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



Last updated on Dec 21, 2023

Earn income with your data and sql skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.