Not sure I understand your question, but I'll give it a try anyhow. `CHECK` constraints containing `SELECT` is valid according to standard (see F671 in for example http://jtc1sc32.org/doc/N1201-1250/32N1208-TC9075-P02-foundation.pdf), but very few DBMS:s supports this. Firebird claims to have this feature  

http://www.firebirdsql.org/en/sql-conformance/. 

SQL-server does not directly support it, but you can hide the select in a function, and use the function in the constraint.

Other than that, I don't know