Learn SQL/Beginner/SQL Foundations/SQL SELECT All Columns (*)

SQL SELECT All Columns (*)

The asterisk means every column — quick to write, but worth using deliberately, not by default.

What & Why

SELECT * returns every column in the table, without naming any of them individually. It's the fastest way to peek at a table's full shape while exploring — but naming exact columns is usually the better habit once you know what you actually need.

See How It Works

idnamechannelspendstart_dateend_datestatustarget_segment
1Spring Launchgoogle_ads55000.002024-01-152024-03-31activesmb
2Retention Webinaremail45000.002024-02-102024-04-15activeenterprise
3Finance Retargetinglinkedin50000.002024-03-122024-05-31activeenterprise
4Enterprise Searchgoogle_ads60000.002024-04-012024-06-30activeenterprise
EXAMPLE QUERY
SELECT *
FROM marketing.campaigns;
RESULT — every marketing.campaigns column
idnamechannelspendstart_dateend_datestatustarget_segment
1Spring Launchgoogle_ads55000.002024-01-152024-03-31activesmb
2Retention Webinaremail45000.002024-02-102024-04-15activeenterprise
3Finance Retargetinglinkedin50000.002024-03-122024-05-31activeenterprise
4Enterprise Searchgoogle_ads60000.002024-04-012024-06-30activeenterprise

SELECT * returns all eight columns in marketing.campaigns for every row shown here.

Beginner business practice

Sign up free to try it on a real business scenario