Developer Encyclopedia

Learn to Code — CodePrimer

A classroom encyclopedia of HTML5, CSS3, JavaScript, PHP 8, SQL, and Laravel. Search a guide, then follow the learning path from beginner to advanced.

Clear
Popular:

Tag filter: #mysql Remove

Showing 24 of 291 guides

SQL / MySQL Beginner

CREATE DATABASE and Character Set utf8mb4

How do I create a MySQL database that stores Unicode correctly?

Relational Design 7 min
SQL / MySQL Beginner

CREATE TABLE with Keys, NOT NULL, UNIQUE, and Defaults

How do I create a table with the right data types and constraints?

Relational Design 8 min
SQL / MySQL Intermediate

ALTER TABLE to Add, Modify, and Index a Column

How do I add a column to a table that already has rows?

Relational Design 7 min
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

Indexes, Composite Indexes, and EXPLAIN

How do I index a WHERE/ORDER BY so MySQL does not scan the whole table?

Integrity & Performance 9 min
SQL / MySQL Intermediate

Foreign Keys, ON DELETE CASCADE, and ON DELETE SET NULL

How do I stop orphan enrollment rows?

Integrity & Performance 8 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 Advanced

Database Normalization: 1NF, 2NF, and 3NF

How do I split repeating course lists out of a user row?

Relational Design 9 min
SQL / MySQL Advanced

SQL Transactions: START TRANSACTION, COMMIT, ROLLBACK

How do I make two writes succeed or fail together?

Integrity & Performance 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 Intermediate

CREATE VIEW for a Roster

How do I save a SELECT as a view?

Relational Design 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 Intermediate

CHECK Constraints

How do I reject a seat count outside 1 to 40 in the table itself?

Integrity & Performance 7 min
SQL / MySQL Beginner

MySQL Date Functions

How do I filter rows from the last seven days?

Queries 7 min
SQL / MySQL Advanced

MySQL JSON Extract

How do I read a field inside a JSON column?

Queries 6 min

Need more coins?

You do not have enough coins for this action.

Your balance: 0 coins

Share

Reactions

Loading reactions…