Description
Contains information about existing constraints in all tables.
Constraints defined on temporary tables are visible in system.constraints only in the session where they were created. They are shown with an empty database field.
Columns
Example
SELECT * FROM system.constraints LIMIT 2 FORMAT Vertical;
Row 1:
──────
database: default
table: hits
name: check_hits
type: CHECK
expression: CounterID > 0
Row 2:
──────
database: default
table: hits
name: assume_positive
type: ASSUME
expression: WatchID > 0
Last modified on June 8, 2026