SQL - UPPER Function



SQL Tutorial - SQL UPPER Function


The UPPER() function converts a string of text to all upper case letters.

SQL UPPER() SYNTAX


Select UPPER(columnname)
FROM
tablename

Upper Function Example


The Products table has the following records:

ProductID ProductName ProductPrice
Prd001 Pen 40.25
Prd002 Pen 100.75
Prd003 Eraser 10.35
Prd004 Pencil 20.45
Prd005 Book 50.65
Prd006 Gum 25.22

To convert the product names of all the products to uppercase, use the 'Upper' function on the 'ProductName' column as shown below.

SELECT UPPER(ProductName) as ProductName
FROM
Products

ProductName
PEN
PEN
ERASER
PENCIL
BOOK
GUM