Using UPPER and LOWER Functions in SQL
📖 Scenario: You work at a bookstore database. The store wants to standardize how author names are displayed in reports. Some names are in uppercase, some in lowercase, and some mixed. You will use SQL functions to convert all author names to uppercase or lowercase.
🎯 Goal: Create a table of authors, then write queries using UPPER() and LOWER() functions to display author names in uppercase and lowercase.
📋 What You'll Learn
Create a table called
authors with columns id (integer) and name (varchar).Insert three authors with exact names: 'Jane Austen', 'mark twain', 'GEORGE ORWELL'.
Write a query to select all author names converted to uppercase using
UPPER().Write a query to select all author names converted to lowercase using
LOWER().💡 Why This Matters
🌍 Real World
Standardizing text case in databases helps keep reports and user interfaces consistent and professional.
💼 Career
Database developers and analysts often need to clean and format text data using functions like UPPER and LOWER.
Progress0 / 4 steps