Welcome to Beginner SQL! Learn SQL by building a TechStore database from scratch.
01-database-creation/ ← START HERE! Create TechStore database
02-schemas-intro/ ← Learn about database schemas
03-first-tables/ ← Create your first table
04-inserting-data/ ← Add data to your tables
05-primary-keys/ ← Understand primary keys
06-foreign-keys/ ← Learn table relationships
07-basic-select/ ← Query your data
Each folder follows this pattern:
01-concept.md- Teaching guide explaining the concept02-practice.sql- First hands-on practice03-practice.sql- More practice examples04-practice.sql- Additional exercises (if needed)
- Read:
02-setup-environment/setup-environment.md - Install SQL Server + SSMS
- Connect to your server
Each folder builds on the previous one!
📁 01-create-database/
CREATE DATABASE TechStore; -- That's it!
USE TechStore; -- Now use it
What you'll learn:
- How to create a database
- How to switch to using it
📁 02-create-first-table/
CREATE TABLE Products (
ProductID INT,
ProductName VARCHAR(100),
Price DECIMAL(10,2)
);
What you'll learn:
- CREATE TABLE syntax
- Simple data types
- View table structure
📁 03-insert-data/
INSERT INTO Products VALUES (1, 'Wireless Mouse', 29.99);
What you'll learn:
- Insert single record
- Insert multiple records
📁 04-query-data/
SELECT * FROM Products; -- See all
SELECT ProductName FROM Products; -- Specific columns
SELECT * FROM Products WHERE Price < 50; -- Filter
SELECT * FROM Products ORDER BY Price; -- Sort
What you'll learn:
- SELECT basics
- WHERE filtering
- ORDER BY sorting
📁 05-add-more-tables/
CREATE TABLE Customers (...);
CREATE TABLE Orders (...);
What you'll learn:
- Create Customers table
- Create Orders table
- Connect them with IDs
📁 06-table-relationships/
SELECT Customers.FirstName, Orders.OrderDate
FROM Customers
JOIN Orders ON Customers.CustomerID = Orders.CustomerID;
What you'll learn:
- JOIN two tables
- JOIN three tables
- See complete order information
- One concept per file
- No complex IF statements
- No system queries
- Just pure SQL basics
Lesson 1 → Lesson 2 → Lesson 3 → etc.
Each builds on the previous one!
- 5-15 lines of actual SQL
- Easy to understand
- Quick to run
- Create TechStore database
- Create Products table
- Insert 5 products
- Query all products
- Filter products by price
- Sort products
- Create Customers table
- Create Orders table
- Insert customer data
- Insert order data
- JOIN Customers and Orders
- JOIN all three tables
✅ CREATE DATABASE
✅ CREATE TABLE
✅ INSERT data
✅ SELECT queries
✅ WHERE filtering
✅ ORDER BY sorting
✅ JOIN tables
📁 Move to ../02-intermediate/ for:
- Primary Keys
- Foreign Keys
- Constraints
- Advanced JOINs
- Subqueries
- Functions
Ready? Open 01-create-database/01-create-database.sql and let's start! 🚀