Himanshu SharmaSoftware engineer
Let’s talk

Beginner to intermediate · 50 lessons

MySQL for beginners

A free MySQL course from install to indexes, transactions, window functions and stored routines. Short lessons with verified output on one sample shop database, a final project and an exam.

Syllabus

Getting started

  1. What MySQL is and how it works12 min
  2. Install MySQL15 min
  3. Connect and run your first commands14 min
  4. The sample shop database12 min

Reading data

  1. SELECT: reading rows and columns14 min
  2. WHERE: filtering rows13 min
  3. AND, OR, NOT, IN and BETWEEN14 min
  4. ORDER BY and LIMIT13 min
  5. LIKE, wildcards and REGEXP14 min
  6. DISTINCT and aliases11 min
  7. NULL values14 min

Changing data

  1. INSERT: adding rows14 min
  2. UPDATE: changing rows13 min
  3. DELETE and TRUNCATE13 min
  4. Upserts: ON DUPLICATE KEY, IGNORE and REPLACE12 min

Functions

  1. String functions14 min
  2. Numeric functions12 min
  3. Date and time functions15 min
  4. CASE, IF, IFNULL and COALESCE13 min

Summarising data

  1. COUNT, SUM, AVG, MIN and MAX13 min
  2. GROUP BY15 min
  3. HAVING and WITH ROLLUP12 min

Combining tables

  1. INNER JOIN16 min
  2. LEFT JOIN and RIGHT JOIN14 min
  3. Self joins and cross joins13 min
  4. UNION and UNION ALL12 min
  5. Subqueries15 min
  6. EXISTS, ANY and ALL12 min

Building databases

  1. CREATE DATABASE and CREATE TABLE14 min
  2. Data types16 min
  3. Primary keys and AUTO_INCREMENT13 min
  4. NOT NULL, UNIQUE, DEFAULT and CHECK14 min
  5. Foreign keys15 min
  6. ALTER TABLE and DROP TABLE13 min
  7. Table design and normalisation17 min

Faster and safer

  1. Indexes18 min
  2. EXPLAIN and query optimisation18 min
  3. Views13 min
  4. Transactions18 min
  5. Storage engines and character sets15 min

Advanced and practical

  1. Window functions18 min
  2. Common table expressions (WITH)15 min
  3. Working with JSON16 min
  4. Stored procedures and functions18 min
  5. Triggers15 min
  6. Variables and prepared statements14 min
  7. Users and privileges15 min
  8. Backup and restore15 min
  9. Using MySQL from code and avoiding SQL injection16 min
  10. Project: reports for an online store30 min