I'm trying to create a table with a field that has a starting date, I want to put in a check to mkae sure that a date before today cannot be entered in. This is the code i have so far for that table
CREATE TABLE client_service (
NHS_num Varchar(10) NOT NULL,
service_id Integer NOT NULL,
starting_date Date NOT NULL CHECK(starting_date >= CURDATE()),
num_weeks Integer NOT NULL CHECK(num_weeks > 0),
client_contribution Decimal(10,2) NOT NULL CHECK(client_contribution >= 0),
CONSTRAINT PrimaryKey PRIMARY KEY (
NHS_num,
service_id,
starting_date
)
);