I want to create a trigger to validate the date of birth, for example it's not > SYSDATE:
Employee -- STRUCTURED TYPE
{
name VARCHAR2(10)
lastname VARCHAR(10)
birthdate DATE
}
Employee_List TABLE OF Employee -- NESTED TABLE
Museum -- TABLE
{
id NUMBER
EmployeeList Employee_List
}
I'm using Oracle 10g.
You cannot define a trigger like "BEFORE UPDATE ON Museum.EmployeeList.birthdate" But you can write a normal trigger BEFORE UPDATE ON Museum and in trigger body you can loop over all employees checking the date.
Try this one: