SQL Manual
SELECT
1. What is it?
SELECT is the primary tool used to retrieve and read data from a database. You can use it to pull all information or only specific columns.
SELECT column1, column2 FROM table_name;
3. Simple Example
To get everything from a table, use the asterisk (*). Example: SELECT * FROM suspects;
4. Investigation Example
As a detective, you'll use SELECT to pull up the master lists of evidence, suspect profiles, or crime scene logs. Selecting specific columns (like name and age) helps you avoid being overwhelmed by irrelevant data.
Key Takeaway
Always start your investigation with SELECT. It is how you pull case files out of the database filing cabinet.
Query Example
SELECT name, age FROM suspects;Expected Result
| name | age |
|---|---|
| Victor Vance | 42 |
| Elena Rostova | 28 |
| Marcus Thorne | 35 |