SQL Basics

Narrowing the Vision: SELECT vs. Specific Columns

Senior Data Analyst
January 2, 2026
5 min read

The Tuesday Morning Refinement

After yesterday's success, the marketing team came to me with a new request. *"We're launching a campaign. Can you get us just the names and price points of our best-selling categories? We don't need the internal SKUs or the warehouse locations."*

Yesterday, I used `SELECT *`. But today, I learned that more data isn't always better data.

The Quest: Moving Beyond the Wildcard

Using `SELECT *` (the wildcard) is like asking a librarian for "every book in the building" when you really just wanted the cookbook section. It’s slow, it’s noisy, and in the world of professional data analysis, it's considered "low-density" work.

To be a professional, you need to be precise. You need to pull only the columns that matter.

The Implementation: The List Selection

I revisited my query. Instead of the asterisk, I listed exactly what I wanted, separated by commas.

-- I only need the name of the product and its retail price

SELECT

product_name,

price

FROM

products;

Why This Matters

1. **Visibility**: Your code is self-documenting. If I see this query, I know exactly what data is in the report.

2. **Performance**: If a table has 100 columns but you only need 2, you are saving the database a massive amount of "memory work."

3. **Cleanliness**: When you export this to Excel or a dashboard, you don't have to delete "trash" columns manually.

The "Oops" Moment

I once sent a report to the CEO using `SELECT *`. Included in that data were internal "Margin" columns that shouldn't have been public. It was a security risk and an embarrassment.

**Pro Tip**: Always narrow your `SELECT` to the absolute minimum required. It protects sensitive data and keeps your reports professional.

The Victory

The marketing team received a clean, two-column list. They were able to drop it into their newsletter template immediately without any further cleaning. I saved them time, and I saved the database resources.

Success isn't just about finding data; it's about filtering out the noise.

Your Task for Today

Modify your query from yesterday. Instead of `*`, select just two specific columns from your table. Notice how much cleaner the output looks.

*Day 3: The Filter—Mastering the WHERE Clause.*

Ready to put your knowledge into practice?

Join SQL Mastery and learn through interactive exercises.