Skip to content

MySQL Tutorials

Learn SQL from zero. Each stage builds on the previous one. Start with concepts, then practice with real code in the playground.

0 of 23 complete
  1. 1

    What is a Database?

    Concepts

    Understand databases, tables, rows, columns, data types, and primary keys.

  2. 2

    SQL Fundamentals

    Interactive

    Learn SQL vocabulary, then run your first CREATE DATABASE and USE statements.

  3. 3

    Your First Table

    Interactive

    Create tables, insert data, query it back with SELECT and WHERE.

  4. 4

    Modifying Data

    Interactive

    Update existing rows, delete rows, and learn safety rules.

  5. 5

    Filtering & Sorting

    Interactive

    Narrow results with AND/OR, LIKE patterns, ORDER BY, LIMIT, and DISTINCT.

  6. 6

    Joins

    Interactive

    Combine data from multiple tables using INNER JOIN and LEFT JOIN.

  7. 7

    Aggregation

    Interactive

    Count, sum, and group data with COUNT, SUM, AVG, GROUP BY, and HAVING.

  8. 8

    Table Constraints

    Interactive

    Enforce data integrity with UNIQUE, NOT NULL, DEFAULT, and FOREIGN KEY.

  9. 9

    Indexes & Performance

    Interactive

    Speed up queries with indexes and learn to use EXPLAIN.

  10. 10

    Putting It All Together

    Interactive

    Build a complete schema from scratch with a real-world scenario.

  11. 11

    Modifying Schema

    Interactive

    Change table structure with ALTER TABLE, DROP, and schema inspection commands.

  12. 12

    Subqueries

    Interactive

    Nest queries inside other queries to solve complex problems step by step.

  13. 13

    Advanced Joins & Set Operations

    Interactive

    Complete your join toolkit with RIGHT JOIN, UNION, and multi-table modifications.

  14. 14

    CASE, Views & Transactions

    Interactive

    Add conditional logic with CASE, store reusable queries with views, and protect data with transactions.

  15. 15

    Functions & Upserts

    Interactive

    Transform data with string and date functions, and handle duplicates with upsert patterns.

  16. 16

    Window Functions

    Interactive

    Compute rankings, running totals, and row-by-row comparisons without collapsing rows.

  17. 17

    Common Table Expressions

    Interactive

    Write readable complex queries with WITH ... AS and explore hierarchies with recursive CTEs.

  18. 18

    Self Joins & NULL Handling

    Interactive

    Join a table to itself and handle NULL values with COALESCE, IFNULL, and NULLIF.

  19. 19

    JSON & Advanced Data Types

    Interactive

    Store flexible data with JSON and understand the nuances of MySQL data types.

  20. 20

    Procedures, Triggers & Security

    Interactive

    Encapsulate logic with stored procedures, automate actions with triggers, and prevent SQL injection.

  21. 21

    User Management & Privileges

    Interactive

    Control who can access your database and what they can do with CREATE USER, GRANT, and REVOKE.

  22. 22

    Isolation Levels & Character Sets

    Interactive

    Control concurrent transaction behavior and store international text correctly with utf8mb4.

  23. 23

    Locking & Deadlocks

    Interactive

    Prevent race conditions with row-level locking and understand how deadlocks happen and how MySQL resolves them.