Retrieving Data with SELECT | The Data Analytics Notes
After inserting data into tables, the next step is to retrieve or view the data stored in the database.
Retrieving Data with SELECT | The Data Analytics Notes
After inserting data into tables, the next step is to retrieve or view the data stored in the database.
This is done using the SELECT statement.
What is SELECT?
The SELECT statement is used to fetch data from one or more tables.
It allows you to:
View all data
View specific columns
Analyse stored information
Basic Syntax:
SELECT * FROM table_name;
Selecting All Columns
To retrieve all columns from a table, we use *:
Example:
SELECT * FROM Employees;

This returns all columns and all rows from the table.
Selecting Specific Columns
You can also select only the columns you need.
Example:
SELECT emp_id, emp_name, salary
FROM Employees;

This returns only the selected columns.
Using DISTINCT
To remove duplicate values:
SELECT DISTINCT department_id
FROM Employees;

Returns only unique values.
Using Aliases (AS)
You can rename columns for better readability.
Example:
SELECT Emp_name AS Name, salary AS Income
FROM Employees;

Takeaway:
The SELECT statement is the starting point for working with data.
It helps you view, understand, and analyse the information stored in your database.
Next Up:
Now that we know how to retrieve data, the next step is to filter it using the WHERE clause.
메타데이터
- post_id
- ee101f4837f3
- slug
- retrieving-data-with-select-the-data-analytics-notes-ee101f4837f3
- url
- https://medium.com/@miranjali22/retrieving-data-with-select-the-data-analytics-notes-ee101f4837f3
- canonical_url
- https://medium.com/@miranjali22/retrieving-data-with-select-the-data-analytics-notes-ee101f4837f3
- author_url
- https://medium.com/@miranjali22
- status
- ok
- fetched_at
- 2026-07-14 00:09:08