SELECT Statements SQL Topic exerciseEasyVerified answerSQLite + PostgreSQL + MySQL + SQL Server live · 1 guided

Basic SELECT - All Columns

Return every column from the employees table.

Exercise brief

Understand the request

HR analyst You are starting a basic employee roster pull and need the raw table first.

Retrieve every column for every employee from the employees table. This is the baseline "show me everything" query — useful when you are exploring a table for the first time.

Return

  • Include all employee columns.

Constraints

  • Use a basic SELECT against employees with no filters.

Data you will use

Review the relevant tables before deciding how to join, filter, or aggregate them.

employees

  • employee_idINTEGER
  • first_nameVARCHAR(50)
  • last_nameVARCHAR(50)
  • emailVARCHAR(100)
  • hire_dateDATE
  • job_idVARCHAR(20)
  • salaryINTEGER
  • manager_idINTEGER
  • department_idINTEGER

Hints, when you need them

Open one clue at a time so you still do the reasoning.

Hint 1

You want every column, so reach for the SELECT * shortcut. Think of `*` as "all columns of the FROM table".

Hint 2

Syntax: SELECT * FROM <table_name>; Always end with a semicolon and make sure the table name is spelled exactly as in the schema browser.

Hint 3

Start with SELECT *, then add the employees table as the source.

Verified SQL answer

Attempt the problem first, then compare structure and reasoning—not just syntax.

Reveal solution and explanation
SELECT * FROM employees;

Why this works

`SELECT *` projects every column of the FROM table in the order they were defined. It is the fastest way to peek at unfamiliar data, but in production code you should usually list columns explicitly so the query stays stable when the schema evolves.

Success check

Every employees row is returned with every source column, without filtering or changing the table grain.

Expected result

Use this output to verify values, aliases, ordering, and row count.

employee_idfirst_namelast_nameemailhire_datejob_idsalarymanager_iddepartment_id
100JohnSmithjohn.smith@company.com2020-01-15IT_MGR120000NULL10
101AliceJohnsonalice.johnson@company.com2021-03-20IT_PROG8500010010
102BobWilsonbob.wilson@company.com2021-06-10IT_PROG8000010010
103CarolDaviscarol.davis@company.com2019-09-05HR_REP60000NULL20
104DavidBrowndavid.brown@company.com2022-02-14FIN_ANALYST70000NULL30
105EmmaTayloremma.taylor@company.com2020-11-30MKT_MGR95000NULL40
106FrankGreenfrank.green@company.com2021-08-25SALES_REP6500010540
107GraceWhitegrace.white@company.com2019-05-12IT_PROG9000010010
108HenryClarkhenry.clark@company.com2022-07-18HR_REP5500010320
109IvyMartinezivy.martinez@company.com2023-01-10FIN_ANALYST6800010430

Learn the concepts behind this answer

Strengthen your understanding with these targeted learning topics:

Continue practicing

SQL Practice Online

Open the interactive workspace and practice across SQL topics.