Last time you learned basic SELECT statements. But what happens when your column names aren't user-friendly? A column called "cust_ph_num" isn't very clear to someone reading your results.
Column aliases solve this by letting you rename columns for better readability.
Engagement Message
Have you ever run into confusing column names before?
The AS keyword creates aliases. Instead of seeing "cust_ph_num" in your results, you can display "Phone Number":
The original column name stays the same—only the display changes.
Engagement Message
What would be a clearer name for a column called "prod_desc"?
Here's the basic alias pattern:
Notice the quotes around "New Display Name"—they're needed whenever your alias contains spaces or special characters.
Engagement Message
Why might quotes be necessary for "Customer Email" but not for "email"?
You can alias multiple columns in one query:
Each column gets its own alias, separated by commas just like regular column names.
Engagement Message
How would you alias both "first_name" and "last_name" to be more readable?
You can also create aliases without using the AS keyword. Just put the new name after the column name:
This works the same way as using AS, but can be quicker to type. Remember, you still need quotes if your alias has spaces or special characters.
