Skip to main content
The SHOW CONSTRAINTS lists all named as well as any unnamed constraints on a table.

Required privileges

The user must have any on the target table.

Aliases

SHOW CONSTRAINT is an alias for SHOW CONSTRAINTS.

Synopsis

show_constraints syntax diagram

Parameters

ParameterDescription
table_nameThe name of the table for which to show constraints.

Response

The following fields are returned for each constraint.
FieldDescription
table_nameThe name of the table.
constraint_nameThe name of the constraint.
constraint_typeThe type of constraint.
detailsThe definition of the constraint, including the column(s) to which it applies.
validatedWhether values in the column(s) match the constraint.

Example

See also