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
Pretty sure TRIGGER will work in each of the databases you mentioned and you get a lot more "elbow room" to work out your constraint.