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
- Run SELECT * FROM customers LIMIT 5.
- Count the columns you see.
- Next lesson: pick only the columns you need.
Examples
Example 1 · dataset: raja_coffee
SELECT * FROM products LIMIT 5;Output
| product_id | product_name | category | unit_price_inr |
|---|---|---|---|
| 101 | Filter Coffee 250g | Beans | 420.0 |
| 102 | Arabica Roast 500g | Beans | 890.0 |
| 103 | Cold Brew Bottle | Drinks | 180.0 |
| 104 | Ceramic Mug | Merch | 350.0 |
| 105 | Chai Masala Blend | Beans | 310.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.
Ravindra Bagale's Tip – मराठी
मोठ्या टेबलवर LIMIT नसलेला SELECT * मंद वाटू शकतो — explore करताना नेहमी LIMIT.
Ravindra Bagale's Tip – हिंदी
बड़ी टेबल पर बिना LIMIT का SELECT * धीमा लग सकता है — explore करते समय हमेशा LIMIT।