MariaDB SQL Quick Reference Guide
MariaDB SQL Quick Reference Guide
GUIDE
CREATE TABLE Create new table in the CREATE TABLE [IF NOT EXISTS]
database table_name(
id INT NOT NULL AUTO_INCREMENT,
column1 VARCHAR(255),
PRIMARY KEY (id)
)
SELECT Retrieve data from the table SELECT column1, column2 FROM
table_name
WHERE Filters rows based on a WHERE column1 = 'value' AND column2 > 10;
specified condition in
the SELECT statement.
<, <=, >, >=, =, Used for comparing WHERE column1 > 5;
!=/<> values in a condition.
ORDER BY Sorts the result set based ORDER BY column1 ASC, column2 DESC;
on one or more columns.
NOT Negates a condition in WHERE NOT condition;
the WHERE clause.