Using UPPER, LOWER, and INITCAP Functions in PostgreSQL
📖 Scenario: You are managing a customer database for a small online store. The customer names are stored in mixed cases, and you want to standardize the display of these names in reports.
🎯 Goal: Learn how to use the PostgreSQL string functions UPPER, LOWER, and INITCAP to format customer names properly.
📋 What You'll Learn
Create a table called
customers with columns id and name.Insert specific customer names with mixed letter cases.
Write queries to display customer names in all uppercase, all lowercase, and capitalized (first letter uppercase, rest lowercase).
Use the exact function names
UPPER, LOWER, and INITCAP.💡 Why This Matters
🌍 Real World
Standardizing text data like customer names helps keep reports and user interfaces consistent and professional.
💼 Career
Database developers and analysts often need to format text data for better readability and presentation in reports and applications.
Progress0 / 4 steps