Skip to main content
Skip to main content
Edit this page

system.constraints

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