MySQL and MariaDB¶
MySQL SQL Constructs¶
MySQL Data Types¶
As with all SQLAlchemy dialects, all UPPERCASE types that are known to be valid with MySQL are importable from the top level dialect:
from sqlalchemy.dialects.mysql import (
BIGINT,
BINARY,
BIT,
BLOB,
BOOLEAN,
CHAR,
DATE,
DATETIME,
DECIMAL,
DECIMAL,
DOUBLE,
ENUM,
FLOAT,
INTEGER,
LONGBLOB,
LONGTEXT,
MEDIUMBLOB,
MEDIUMINT,
MEDIUMTEXT,
NCHAR,
NUMERIC,
NVARCHAR,
REAL,
SET,
SMALLINT,
TEXT,
TIME,
TIMESTAMP,
TINYBLOB,
TINYINT,
TINYTEXT,
VARBINARY,
VARCHAR,
YEAR,
)In addition to the above types, MariaDB also supports the following:
from sqlalchemy.dialects.mysql import (
INET4,
INET6,
)Types which are specific to MySQL or MariaDB, or have specific construction arguments, are as follows: