Beginner

52. UPPER Function

Learn how to convert text values into uppercase characters using SQL.

📘 Lesson 52 of 728 ⏱ 6 min 🎯 Beginner

The UPPER function converts alphabetic characters in a text value to uppercase. It is commonly used to standardize text, format output, and perform consistent text comparisons.

Business databases can contain text with inconsistent capitalization. Converting values to uppercase can make reports more consistent and help with certain data-cleaning tasks.

If employee department names are stored using different capitalization styles, UPPER can display them consistently in uppercase.

SQL
SELECT
    EmployeeName,
    UPPER(Department) AS DepartmentName
FROM Employees;

UPPER is useful for data cleaning, standardization, reporting, customer analysis, department analysis, and preparing data for comparison.

  • UPPER converts text to uppercase.
  • UPPER is a string function.
  • It can be used in SELECT expressions.
  • It can help standardize text output.
  • Function behavior can depend on database collation and character support.
What does UPPER do in SQL?

UPPER converts alphabetic characters in a text value to uppercase.

Why would you use UPPER?

UPPER can help standardize text values and produce consistent formatted output.

Have you finished this lesson?

Introduction to SQL – All Lessons