Ravindra BagaleCourses & study guides Track your progress

3. SELECT Basics: Read Rows Without Changing Data

3.2 How to Select All Columns with SELECT *

Why. SELECT * is a fast look — then narrow columns for real work.

What. SELECT * returns every column in table order.

How. Use * to explore. Prefer named columns in reports.

Steps

  1. Run SELECT * FROM customers LIMIT 5.
  2. Count the columns you see.
  3. Next lesson: pick only the columns you need.

Examples

Example 1 · dataset: raja_coffee

SELECT * FROM products LIMIT 5;

Output

product_idproduct_namecategoryunit_price_inr
101Filter Coffee 250gBeans420.0
102Arabica Roast 500gBeans890.0
103Cold Brew BottleDrinks180.0
104Ceramic MugMerch350.0
105Chai Masala BlendBeans310.0

Meaning. All product columns for five products.

Ravindra Bagale's Tip

On huge tables, SELECT * with no LIMIT can feel slow — always LIMIT while exploring.