hello experts...
i have a table employee and in it are attributes like name gender,birthdate...etc..
apart from this i want to automatically generate d employees age from d current date....how can it be done??
thankyou...

a simple subtraction of birthdate from sysdate will do the trick for you.

maybe something like this will do the trick

select round(to_number(sysdate-birthdate)/365) age from test_birthdate;

as previously mentioned, sysdate minus birthdate and divided by 365 days in year.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.