-
I have this EMPLOYEE table with the following fields.
SQL> desc employee;
Name Null? Type
------------------------------- -------- ----
FNAME NOT NULL VARCHAR2(15)
MINIT NOT NULL CHAR(1)
LNAME NOT NULL VARCHAR2(15)
SSN NOT NULL CHAR(9)
BDATE DATE
ADDRESS NOT NULL VARCHAR2(30)
SEX CHAR(1)
SALARY NUMBER(5)
SUPERSSN CHAR(9)
DNO NUMBER(1)
Need to create a function called AGE to calculate an age (integer value) based on the birthdate. Would be something like
CREATE OR REPLACE FUNCTION AGE (...) RETURN......
END AGE;
Can anyone help? I know I have to use SYSDATE-BIRTHDATE, but how to make the conversion in order to get the age as in integer value?
Thanks,
SKY
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|