MySQL 8

SQL / MySQL Tutorial & Reference

Tables, queries, joins, indexes, foreign keys, CTEs, and normalization.

Clear
Popular:

MySQL 8 Learning Path

Follow the SQL / MySQL Curriculum

Read the guides in order from fundamentals to production patterns, or jump to your current skill level.

Showing 24 of 37 guides

SQL / MySQL Intermediate

INSERT and UPDATE Rows with an Explicit WHERE

How do I insert a user and update that same row safely?

Queries 7 min
SQL / MySQL Intermediate

DELETE a Single Row with WHERE

How do I delete one row without emptying the table?

Queries 6 min
SQL / MySQL Beginner

SELECT, WHERE, and Comparison Predicates

How do I read specific rows from a MySQL table?

Queries 7 min
SQL / MySQL Intermediate

ORDER BY with LIMIT and OFFSET Pagination

How do I page through sorted SQL results?

Queries 8 min
SQL / MySQL Intermediate

COUNT, SUM, AVG, GROUP BY, and HAVING

How do I total and filter groups in SQL?

Queries 8 min
SQL / MySQL Intermediate

INNER JOIN Across Users, Courses, and Enrollments

How do I combine matching rows from related tables?

Queries 8 min
SQL / MySQL Intermediate

LEFT JOIN to Keep Rows with No Match

How do I list every user even when they have no enrollment?

Queries 7 min
SQL / MySQL Advanced

Subqueries in WHERE and in the SELECT List

How do I filter rows using a nested SELECT?

Queries 9 min
SQL / MySQL Advanced

Common Table Expressions with WITH

How do I name a subquery so a report is readable?

Queries 8 min
SQL / MySQL Intermediate

CASE Expressions in SELECT

How do I turn a status code into a label in SQL?

Queries 8 min
SQL / MySQL Intermediate

UNION of Two Result Sets

How do I stack two SELECT results in one list?

Queries 8 min
SQL / MySQL Advanced

ROW_NUMBER and SUM Over a Window

How do I rank rows without collapsing them with GROUP BY?

Queries 9 min
SQL / MySQL Intermediate

INSERT ... ON DUPLICATE KEY UPDATE

How do I insert a row or update it when the unique key exists?

Queries 8 min
SQL / MySQL Beginner

MySQL Date Functions

How do I filter rows from the last seven days?

Queries 7 min
SQL / MySQL Intermediate

SQL EXISTS for a Membership Test

How do I find lessons that have at least one confirmed seat?

Queries 6 min
SQL / MySQL Beginner

COALESCE and NULLIF

How do I show a fallback when a column is null?

Queries 6 min
SQL / MySQL Intermediate

SQL CAST and CONVERT

How do I compare a numeric string column as a number?

Queries 6 min
SQL / MySQL Beginner

SELECT DISTINCT

How do I list each track once?

Queries 6 min
SQL / MySQL Advanced

TRUNCATE versus DELETE

When should I empty a table with TRUNCATE instead of DELETE?

Queries 6 min
SQL / MySQL Beginner

SQL BETWEEN and IN

How do I filter lessons by a seat range or a list of tracks?

Queries 6 min
SQL / MySQL Advanced

MySQL JSON Extract

How do I read a field inside a JSON column?

Queries 6 min
SQL / MySQL Advanced

SQL INTERSECT

How do I find users who both teach and enroll?

Queries 6 min
SQL / MySQL Intermediate

SQL LIKE and Escaped Wildcards

How do I search lesson titles without treating a percent sign as a wildcard?

Queries 6 min
SQL / MySQL Intermediate

CHAR_LENGTH and LENGTH

How do I measure a title in characters instead of bytes?

Queries 6 min

Need more coins?

You do not have enough coins for this action.

Your balance: 0 coins

Share

Reactions

Loading reactions…