SQL Basics
Learn how SQL works, how databases store information, and how to retrieve data using your first SELECT queries.
Complete the activity and related MCQ to unlock the next concept.
Explore the Customers Table
SQL works with structured data. This Customers table contains customer IDs, names, cities and ages.
| customer_id | name | city | age |
|---|---|---|---|
| 101 | Rahul | Delhi | 24 |
| 102 | Priya | Mumbai | 29 |
| 103 | Amit | Pune | 31 |
| 104 | Neha | Delhi | 26 |
Understand the Database
Before writing SQL, understand how information is organized inside a relational database.
What does one row normally represent in a database table?
SQL Basics Β· Lesson 1
Frequently Asked Questions
Review the essential ideas from this lesson. Select a question to open its answer.
What is SQL?
SQL (Structured Query Language) is used to communicate with relational databases. Analysts commonly use it to retrieve, filter, combine, and summarize stored data.
What is the difference between a database and a table?
A database is an organized collection that can contain multiple tables. A table stores records about a subject using rows and columns.
What does SELECT do in SQL?
SELECT specifies which columns or expressions should appear in the query result.
What does FROM do in a SQL query?
FROM identifies the table or other data source from which the query retrieves information.
What is the difference between SELECT * and selecting specific columns?
SELECT * requests every column from the source. Naming specific columns returns only the fields needed, making the result more focused and easier to use.
Do SQL keywords have to be written in uppercase?
In most common SQL systems, keywords are not case-sensitive, so SELECT and select work the same way. Uppercase keywords are a common style convention that improves readability.
How should I approach a business question with SQL?
Identify the information needed to answer the question, map that information to columns, identify the source table, and then write and check the SELECT ... FROM query.
What should I learn after SQL Basics?
Continue to Lesson 2: Databases, Tables & Keys to learn how tables are structured and how primary and foreign keys identify and connect records.