The AS keyword
Part of the Fundamentals section of Coddy's SQL journey — lesson 21 of 72.
Clear and descriptive column names are essential for presenting data in a meaningful way. If you show a table with bad column names, it will be hard for your audience to understand what you are talking about.
To change column names you may use the AS keyword
SELECT col1 AS firstColumn, col2 AS secondColumn, ...
FROM table1Challenge
EasyAvailable tables and columns:
<strong>kitchen_items</strong>:<strong>cutlery</strong>,<strong>amount</strong>
Fetch all of the kitchen items that the amount is less than 3 items. Change the cutlery column name to silverware
Cheat sheet
To change column names use the AS keyword:
SELECT col1 AS firstColumn, col2 AS secondColumn
FROM table1Try it yourself
This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Fundamentals
4More Keywords
The IN keywordThe BETWEEN keywordThe LIKE keywordThe AS keywordRecap - Cellphone Models2Conditions
Conditions BasicsThe AND keywordThe OR keywordThe NOT keywordMultiple Conditions CombinedParenthesisBooleans5Arithmetic Operations
Mathematical OperatorsMathematical ColumnsThe Modulo OperationThe ROUND() Function3Specific Return Format
Null valuesSort Results Part 1Sort Results Part 2Recap - Cyber Security FirmLimit number of recordsRecap - Vehicle Factory6Intro Challenges
Recap - Parliamentary ElectionRecap - Police Criminal ArrestRecap - Bar Beverage ContainerRecap - Engineer new columns