BBampaa

Lessons › SQL › Chapter 1: Reading data

SQL lesson

SELECT all columns

Use it first on any new table, to see what's in it.

Try this lesson free →
About 5–10 minutes · no sign-up needed

Example

See a whole table

SELECT *
FROM products

Result:

Step by step

  1. Starts every query. It means "show me".
    SELECT * FROM products
  2. The star means every column, so you see the whole table.
    SELECT * FROM products
  3. FROM says which table to look in.
    SELECT * FROM products

Practice

Try each one in your head first, then open the answer.

1. Write a query to show all columns and rows from the orders table.
SELECT * FROM orders
2. Write a query to show all columns and rows from the products table.
SELECT * FROM products
3. Write a query to show all columns and rows from the customers table.
SELECT * FROM customers
4. Write a query to show all columns and rows from the inventory table.
SELECT * FROM inventory
5. Write a query to show all columns and rows from the returns table.
SELECT * FROM returns

Learn it by doing. This lesson is a short hands-on level on Bampaa: see it work, then build and write it yourself, with instant feedback.

Try this lesson free →
About 5–10 minutes · no sign-up needed