We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Select Multiple Columns

As you probably guessed, if you can select all columns with a *, and you can select a single column by name, you can probably also select multiple columns by name. Here's the syntax:

select column_one, column_two, column_three from table_name;

For example, if I had a table of monster records for a game, I might write:

select health, damage, defense from monsters;

All SQL statements must end with a semicolon ;.

Assignment

Update the query to select the:

  • age
  • name
  • balance

columns in that order.

Remember, our users table in CashPal has this schema:

id name age balance is_admin
1 John Smith 28 450 1
2 Darren Walker 27 200 1
3 Jane Morris 33 496.24 0