×

sql · level 1 · unit 4 · lesson 3

  1. meet it
  2. guess first
  3. your turn
  4. fix it
  5. nailed it

Tap a green word if you get lost.

meet it

gives a column a better name.

A top line like price * 3 is hard to read. Write AS and a new name after it, and the result uses that name instead. The new name is called an .

Use one word, or join words with underscores, like pack_price. Leave out spaces, or SQL cannot tell where the name ends.

An alias only changes the result. The column in the table keeps its old name.

SELECT name, price * 3 AS pack_price FROM snacks;

AS can be left out, so SELECT name age quietly renames name to age: one more reason commas matter.