The SELECT statement in SQL is used to retrieve data from a database. It is one of the most fundamental and frequently used commands in SQL.
SQL Select Syntax
SQL
x
1
SELECT column1, column2, ...
2
FROM table_name;
SQL Select Examples
SQL Select * All Columns Example
This query SELECTS every the columns from the DOCTORS table.
SQL
1
1
select * from doctors;

SQL Select One Specific Column Example
This query SELECTS the first_name column only from the doctors table. It’s called Selecting One Specific column because it is only calling one unique column from the table which can have multiple columns.
SQL
1
1
select first_name from doctors;

SQL Select Multiple Columns Example
This query SELECTS the first_name and last_name columns from the doctors table. Thereby, it is called selecting multiple columns.
SQL
1
1
select first_name, last_name from doctors;

SQL Select Visual Diagram
