I'm created a table called Project with two columns ProjectID and StartDate. I would like to create a constraint that will assure that the date entred is always equal to today or a future date.
I have tried the code below but gets a missing expression error. The Constraint is only added after the creation of the table.
CREATE TABLE PROJECT
(ProjectID NUMBER(7),
StartDate date NOT NULL,
CONSTRAINT PK_PROJECTID PRIMARY KEY (ProjectID)
);
ALTER TABLE PROJECT
ADD CONSTRAINT PROJECT_Check_StartDate CHECK(StartDate => Current_date);