i have a table
dates
(dob date,
age number(4)
);
I will insert a date of birth and a trigger will calculate the age and insert that age in
If you do it by a trigger the age is potentially wrong after one day. This is why saving the age in a database table is bad practice and nobody does that. What you need is a view.
create view person_age as
select person_id,
floor(months_between(trunc(sysdate),birthdate)/12) as age
from birthdays;
Look at the SQL Fiddle