3. SELECT Basics: Read Rows Without Changing Data
3.3 How to Select Specific Columns and Change Column Order
Why. Reports need specific columns in a useful order.
What. List column names after SELECT, separated by commas. Order in the list = order in the result.
How. SELECT city, amount_inr, order_date FROM orders;
Steps
- Write SELECT with three columns you care about.
- Change their order and run again.
- Notice the grid headers move.
Examples
Example 1 · dataset: raja_coffee
SELECT city, amount_inr, order_date
FROM orders
LIMIT 5;Output
| city | amount_inr | order_date |
|---|---|---|
| Pune | 840.0 | 2026-09-02 |
| Mumbai | 720.0 | 2026-09-03 |
| Goa | 890.0 | 2026-09-05 |
| Pune | 1050.0 | 2026-09-06 |
| Kolhapur | 620.0 | 2026-09-07 |
Meaning. Only three columns, city first.
Ravindra Bagale's Tip
Name columns on purpose — future you will thank present you.
Ravindra Bagale's Tip – मराठी
कॉलम जाणूनबुजून नावांनी लिहा — भविष्यातील तुम्ही आभार मानाल.
Ravindra Bagale's Tip – हिंदी
कॉलम जान-बूझकर नाम से लिखें — भविष्य का आप धन्यवाद देगा।