Skip to main content
/1 min read

SQL SELECT Tutorial

How SELECT Works

Specifies Columns

First input in any query — picks which columns of data to retrieve.

Use * for All Columns

SELECT * FROM table; returns every column.

Multiple Columns

Comma-separated: SELECT player, team FROM stats;

End with Semicolon

Every query ends with a semicolon (;) to mark completion.

Master SQL at Noble Desktop

Noble Desktop's SQL Bootcamp covers queries, joins, aggregations, and the full SQL toolkit data analysts use every day.

Simple Tutorial on how to use the SELECT statement in SQL

SELECT Statement

  • The SELECT statement is our first input whenever we write a query to retrieve data from a table.

  • This statement specifies which columns or data we want to retrieve from our table.

  • Syntax: SELECT * FROM table ;

Example

Let’s say we have a basketball league and we keep records of each player, which team they are on, and their basic statistics.

Stats Table

If we wanted to use a SQL query to retrieve the player and team of each player, we would write the following:

SQL Select

We are saying that we’d like to retrieve the player and team columns from the Stats table. Once we hit ENTER and run, our result should be as follows:

SQL SELECT Result