Introduction

SELECT Statement

FROM Clause

Comparison Operators

WHERE Clause

ORDER BY Clause

AND Condition

OR Condition

Combining the AND and OR Conditions

DISTINCT Clause

IN Condition

IS NULL Condition

IS NOT NULL

LIKE Condition

RLIKE Condition

NOT Condition

ALIASES

Joins

BETWEEN Condition

INSERT Statement

UPDATE Statement

DELETE Statement

TRUNCATE TABLE Statement

EXISTS Condition

GROUP BY Clause

HAVING Clause

SELECT LIMIT Statement

DELETE LIMIT Statement

UNION Operator

UNION ALL Operator

INTERSECT Operator

Subqueries

Data Types

CREATE TABLE Statement

CREATE TABLE AS Statement

Primary Keys

ALTER TABLE Statement

DROP TABLE Statement

VIEW

Unique Constraints

Indexes

Grant/Revoke Privileges

Show grants for a user in MariaDB

CREATE USER statement

Change a user password

RENAME USER statement

DROP USER statement

Find Users in MariaDB

Find Users logged into MariaDB

Comments within SQL

Literals

Declaring Variables

Sequences (AUTO_INCREMENT)

Functions

Procedures

IF-THEN-ELSE Statement

WHILE Loop Statement

LEAVE Statement

ITERATE Statement

RETURN Statement

LOOP Statement

REPEAT Statement

CASE Statement

Declare a Cursor

OPEN Statement

FETCH Statement

CLOSE Statement

Set up a Handler for Cursor's NOT FOUND condition

BEFORE INSERT Trigger

AFTER INSERT Trigger

BEFORE UPDATE Trigger

AFTER UPDATE Trigger

BEFORE DELETE Trigger

AFTER DELETE Trigger

DROP TRIGGER Statement