Basics · Lesson 2 of 19

Selecting Specific Columns

The asterisk (*) grabs everything, but usually you only want specific columns.

List the exact columns you need:

SELECT first_name, salary FROM employees;

Benefits:

  • Faster queries (less data to fetch)
  • Cleaner results
  • Better for reports

Separate column names with commas.

Check your understanding

Get only the first_name and salary columns from employees.

Examples run on the employees sample database. Open any of them in the playground to experiment.