WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

SQL UCASE() Function


The UCASE() Function

The UCASE() function converts the value of a field to uppercase.

SQL UCASE() Syntax

SELECT UCASE(column_name) FROM table_name;

Syntax for SQL Server

SELECT UPPER(column_name) FROM table_name;

Demo Database

In this tutorial we will use the well-known Northwind sample database.

Below is a selection from the "Customers" table:

CustomerID CustomerName Phone City
1

Kenneth H. Stark 360-307-2991 WA
2 Michael C. Ochoa 847-655-9036 IL
3 Dennis A. Shaw 320-323-5667 MN
4

Dennis R. Miller 256-314-2123 AL

SQL UCASE() Example

The following SQL statement selects the "CustomerName" and "City" columns from the "Customers" table, and converts the "CustomerName" column to uppercase:

Example

SELECT UCASE(CustomerName) AS Customer, City
FROM Customers;