Most of MariaDB syntax is the same as MySQL. This issue lists only the differences. #### Expressions - [x] No JSON operators (`->`, `->>`) - [x] No `MEMBER OF` operator #### Query syntax - [x] `SQL_CACHE` modifier - [x] No `WITH ROLLUP` in `ORDER BY` - [x] Limiting: - [x] `ROWS EXAMINED rows_limit` - [x] `OFFSET start {ROW ROWS}` - [x] `FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } { ONLY | WITH TIES }` - [ ] `PROCEDURE` clause - [x] No `FOR SHARE` (only `FOR UPDATE`) - [ ] `LOCK IN SHARE MODE` with `lock_option` parameter (I've found no examples of this `lock_option` being used). - [ ] `FROM` clause: - [ ] No ODBC `{ OJ }` syntax - [ ] No `LATERAL` - [ ] No `NATURAL INNER JOIN` - [ ] `FOR SYSTEM_TIME` specification (combined with `PARTITION`) - [ ] `MINUS {ALL | DISTINCT}` in addition to `UNION` etc. #### Statements - [ ] DELETE - [ ] `FOR PORTION OF period FROM _ TO _` - [x] `RETURNING` clause - [ ] `DELETE HISTORY` - [x] No `WITH` clause - [ ] UPDATE - [ ] `FOR PORTION OF period FROM _ TO _` - [ ] No `WITH` clause - [ ] `PARTITION (..)` clause - [x] INSERT - [x] `RETURNING` clause #### DDL Statements - [ ] [CREATE TABLE](https://mariadb.com/kb/en/create-table/) - [ ] `CONSTRAINT [name]` can only be used with `CHECK()`, `PRIMARY KEY`, `FOREIGN KEY`, `UNIQUE`. - [x] no support for `[NOT] ENFORCED` modifier on `CHECK()` (or any other) constraint. - [ ] RENAME TABLE - [ ] `TABLE[S]` - [ ] `IF EXISTS` - [ ] `WAIT n | NOWAIT` - [ ] DROP TABLE - [ ] `WAIT n | NOWAIT` - [ ] [ALTER TABLE](https://mariadb.com/kb/en/alter-table/) - [ ] `ALTER [ONLINE] [IGNORE] TABLE` - [ ] `IF EXISTS` - [ ] `WAIT n | NOWAIT` - [ ] alter actions: - [ ] no `RENAME [AS]`, only `RENAME [TO]` - [x] `ADD [COLUMN] [IF NOT EXISTS]` - [ ] `ADD [CONSTRAINT [symbol]] FOREIGN KEY [IF NOT EXISTS] ...` - [x] `DROP CONSTRAINT IF EXISTS` - [x] no `ALTER CONSTRAINT` - [x] no `DROP CHECK` - [x] no `ALTER COLUMN SET {VISIBLE | INVISIBLE}` - [ ] CREATE VIEW - [ ] DEFINER = user | CURRENT_USER | role | CURRENT_ROLE - [x] IF NOT EXISTS - [ ] ALTER VIEW - [ ] DEFINER = user | CURRENT_USER
Most of MariaDB syntax is the same as MySQL. This issue lists only the differences.
Expressions
->,->>)MEMBER OFoperatorQuery syntax
SQL_CACHEmodifierWITH ROLLUPinORDER BYROWS EXAMINED rows_limitOFFSET start {ROW ROWS}FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } { ONLY | WITH TIES }PROCEDUREclauseFOR SHARE(onlyFOR UPDATE)LOCK IN SHARE MODEwithlock_optionparameter (I've found no examples of thislock_optionbeing used).FROMclause:{ OJ }syntaxLATERALNATURAL INNER JOINFOR SYSTEM_TIMEspecification (combined withPARTITION)MINUS {ALL | DISTINCT}in addition toUNIONetc.Statements
FOR PORTION OF period FROM _ TO _RETURNINGclauseDELETE HISTORYWITHclauseFOR PORTION OF period FROM _ TO _WITHclausePARTITION (..)clauseRETURNINGclauseDDL Statements
CONSTRAINT [name]can only be used withCHECK(),PRIMARY KEY,FOREIGN KEY,UNIQUE.[NOT] ENFORCEDmodifier onCHECK()(or any other) constraint.TABLE[S]IF EXISTSWAIT n | NOWAITWAIT n | NOWAITALTER [ONLINE] [IGNORE] TABLEIF EXISTSWAIT n | NOWAITRENAME [AS], onlyRENAME [TO]ADD [COLUMN] [IF NOT EXISTS]ADD [CONSTRAINT [symbol]] FOREIGN KEY [IF NOT EXISTS] ...DROP CONSTRAINT IF EXISTSALTER CONSTRAINTDROP CHECKALTER COLUMN SET {VISIBLE | INVISIBLE}