Check & Default

Published July 26, 2025 By Sai Sree Ram Gundepudi

CHECK and DEFAULT Constraints

CHECK

CREATE TABLE employees (
  emp_id NUMBER,
  salary NUMBER CHECK (salary > 0)
);

DEFAULT

CREATE TABLE employees (
  emp_id NUMBER,
  hire_date DATE DEFAULT SYSDATE
);

Was this solution helpful?

Your feedback helps improve our technical knowledge repository.

Share this article