Ever since the release of MySQL 8.0.16, we’ve had the ability to create CHECK
constraints in MySQL. At some point, we may want to return a list of CHECK
constraints that have been created in a database or against a given table.
Fortunately, we can use the information_schema.check_constraints
view to do just that.
We can alternatively use the information_schema.table_constraints
view to get the same info.