
OR REPLACE, which is only crash safe.

Examples
--------

create table if not exists test (
a bigint auto_increment primary key,
name varchar(128) charset utf8,
key name (name(32))
) engine=InnoDB default charset latin1;

This example shows a couple of things:

* Usage of IF NOT EXISTS; If the table already existed, it will not be
created.  There will not be any error for the client, just a warning.
* How to create a PRIMARY KEY that is automatically generated.
* How to specify a table-specific character set and another for a column.
* How to create an index (name) that is only partly indexed (to save space).

The following clauses will work from MariaDB 10.2.1 only.

CREATE TABLE t1(
 a int DEFAULT (1+1),
 b int DEFAULT (a+1),
 expires DATETIME DEFAULT(NOW() + INTERVAL 1 YEAR),
 x BLOB DEFAULT USER()
);

URL: https://mariadb.com/kb/en/create-table/