Posts

SQL differences

MySQL Refuses a Plain DEFAULT Value on TEXT Columns

A notes column declared as TEXT DEFAULT '' works on SQLite, PostgreSQL and MariaDB. MySQL refuses the CREATE TABLE. MySQL 8.0.13 and later accept a default written as an …

SQL differences

MySQL Refuses CREATE INDEX IF NOT EXISTS

Migrations that may run twice often say CREATE INDEX IF NOT EXISTS, and SQLite, PostgreSQL and MariaDB accept it. MySQL stops the migration with a syntax error. MySQL …

SQL differences

PostgreSQL Refuses Select List Names in HAVING

A report of repeat customers names its count of orders n in the select list and filters on that name in HAVING. SQLite, MySQL and MariaDB run it, and PostgreSQL refuses …