Hello,
In creating my database (using Oracle 11g Express), specifically my employee table, is there a way to create a constraint to ensure that the employee is equal to, or older than, 18 years old?
I do not want to ask people their age. I'd like to do it based off their DOB (as below). E.G. - The 'DOB' value listed in the below table.
Thanks for your help!
CREATE TABLE EMPLOYEE
(EmpNo NUMBER(6) PRIMARY KEY,
DOB DATE,
HireDate DATE DEFAULT GETDATE());