What SQL databases, if any, support subqueries in CHECK constraints?
At present and as far as I know, Oracle, MySQL, and PostgreSQL do not.
EDIT
H2 also supports subqueries in constraints. In Psql mode no less :P
MariaDB does not seems to also support it as a constraint.
ALTER TABLE Table_1 ADD CONSTRAINT constraint_1
CHECK (column_1 > (SELECT MAX(column_2) FROM Table_2) NOT DEFERRABLE;
Important Because the book is about the SQL-99 standard, the contents of this and other pages in the book may not directly apply to MariaDB. Use the navigation bar to navigate the book.
This sort of thing was once illegal, but in modern variations of SQL, you'll see inter-table Constraint references on an occasional basis.
For reference, this is the ticket for implementing check constraints on MariaDB. As of 2015-07-23, it is still in "Open" status.