CHECK Constraint in MySQL

Published July 26, 2025 By Sai Sree Ram Gundepudi

CHECK Example

CREATE TABLE students (
  age INT CHECK (age >= 18)
);

Rows failing the CHECK condition will not be inserted.

Was this solution helpful?

Your feedback helps improve our technical knowledge repository.

Share this article