Oninit Logo
The Down System Specialists
+1-913-674-0360
+44-2081-337529
Partnerships Contact
Finderr

-530 Check constraint constraint-name failed.

The check constraint placed on the table column was violated. To see the check constraint associated with the column, query the syschecks system catalog table. However, you must know the constrid for the check constraint before you query syschecks. (The constrid is assigned in the sysconstraints system catalog table.) Use the following subquery to show the check constraint for constraint-name:

SELECT * FROM syschecks WHERE constrid = (SELECT constrid FROM sysconstraints WHERE constrname = constraint-name)

In certain scenarios, you might get this error without a constraint name being specified. This can happen if you are performing a DDL operation that has a check constraint that is violated by the existing data on the table. In this case, the DDL operation would not succeed, and thus the constraint name would not be in the system catalog.