MySQL Tutorials
Learn SQL from zero. Each stage builds on the previous one. Start with concepts, then practice with real code in the playground.
- 1
What is a Database?
ConceptsUnderstand databases, tables, rows, columns, data types, and primary keys.
- 2
SQL Fundamentals
InteractiveLearn SQL vocabulary, then run your first CREATE DATABASE and USE statements.
- 3
Your First Table
InteractiveCreate tables, insert data, query it back with SELECT and WHERE.
- 4
Modifying Data
InteractiveUpdate existing rows, delete rows, and learn safety rules.
- 5
Filtering & Sorting
InteractiveNarrow results with AND/OR, LIKE patterns, ORDER BY, LIMIT, and DISTINCT.
- 6
Joins
InteractiveCombine data from multiple tables using INNER JOIN and LEFT JOIN.
- 7
Aggregation
InteractiveCount, sum, and group data with COUNT, SUM, AVG, GROUP BY, and HAVING.
- 8
Table Constraints
InteractiveEnforce data integrity with UNIQUE, NOT NULL, DEFAULT, and FOREIGN KEY.
- 9
Indexes & Performance
InteractiveSpeed up queries with indexes and learn to use EXPLAIN.
- 10
Putting It All Together
InteractiveBuild a complete schema from scratch with a real-world scenario.
- 11
Modifying Schema
InteractiveChange table structure with ALTER TABLE, DROP, and schema inspection commands.
- 12
Subqueries
InteractiveNest queries inside other queries to solve complex problems step by step.
- 13
Advanced Joins & Set Operations
InteractiveComplete your join toolkit with RIGHT JOIN, UNION, and multi-table modifications.
- 14
CASE, Views & Transactions
InteractiveAdd conditional logic with CASE, store reusable queries with views, and protect data with transactions.
- 15
Functions & Upserts
InteractiveTransform data with string and date functions, and handle duplicates with upsert patterns.
- 16
Window Functions
InteractiveCompute rankings, running totals, and row-by-row comparisons without collapsing rows.
- 17
Common Table Expressions
InteractiveWrite readable complex queries with WITH ... AS and explore hierarchies with recursive CTEs.
- 18
Self Joins & NULL Handling
InteractiveJoin a table to itself and handle NULL values with COALESCE, IFNULL, and NULLIF.
- 19
JSON & Advanced Data Types
InteractiveStore flexible data with JSON and understand the nuances of MySQL data types.
- 20
Procedures, Triggers & Security
InteractiveEncapsulate logic with stored procedures, automate actions with triggers, and prevent SQL injection.
- 21
User Management & Privileges
InteractiveControl who can access your database and what they can do with CREATE USER, GRANT, and REVOKE.
- 22
Isolation Levels & Character Sets
InteractiveControl concurrent transaction behavior and store international text correctly with utf8mb4.
- 23
Locking & Deadlocks
InteractivePrevent race conditions with row-level locking and understand how deadlocks happen and how MySQL resolves them.