Hi
I have in my table a Colum „date_of_birth “, and also I have a Colum “age”.
Now if the users register they chooses the DOB in a date picker field and this DOB is than stored in the table after they click button to register.
But now I need that the automatically calculated Age from DOB gets automatically stored in the Colum “age”.
This calculate age from DOB:
SELECT date_of_birth,
TRUNC(MONTHS_BETWEEN(sysdate, dob)/12) age_user
FROM users
WHERE USERNAME = v('APP_USER');
And if the Users login the Colum “age” should be automatically updated!
So how can I do that it automatically stores the age in the Colum “age”?
And what should be done that this Colum gets updated?
Any help is appreciated.
thx