Using UPPER and LOWER Functions in SQL
📖 Scenario: You are managing a small customer database for a local bookstore. The customer names are stored in mixed case, but you want to standardize the display of names in reports.
🎯 Goal: Build SQL queries that use the UPPER and LOWER functions to convert customer names to all uppercase and all lowercase letters.
📋 What You'll Learn
Create a table called
customers with columns id (integer) and name (text).Insert three customers with names in mixed case: 'Alice', 'bOb', 'CHARLie'.
Write a query to select all customer names converted to uppercase using the
UPPER function.Write a query to select all customer names converted to lowercase using the
LOWER function.💡 Why This Matters
🌍 Real World
Standardizing text data for reports and searches is common in databases to ensure consistent display and comparisons.
💼 Career
Database developers and analysts often use text functions like UPPER and LOWER to clean and format data for applications and reports.
Progress0 / 4 steps