I want to list out all the Firebird check constraints and it's conditions.
I have used the below query, but this query is only showing the constraints name and its table. I want to see the constraint condition as well.
SELECT * FROM RDB$RELATION_CONSTRAINTS
Check constraints are implemented with triggers. The following query will show you the source of check constraints.
This query will report the constraint twice, because in current versions of Firebird check constraints are implemented with two separate triggers: a
before inserttrigger (type = 1) and abefore updatetrigger (type = 3). This is an implementation artifact.A query getting the source of just one of the triggers (as both are identical):