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.
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.