Menu
Coddy logo textTech

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 table1
challenge icon

Challenge

Easy

Available 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 table1

Try it yourself

quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Fundamentals