Question: PL/SQL Programs Stored Function: Age() (a) Create a PL/SQL function called AGE that calculates an age (integer value) based on one argument DOB attribute of
PL/SQL Programs
Stored Function: Age()
(a) Create a PL/SQL function called AGE that calculates an age (integer value) based on one argument DOB attribute of EMPLOYEE table of the ORDER schema. Your age must be a truncated integer value (e.g, 23.7 will be displayed as 23). The heading of your function will look like:
CREATE OR REPLACE FUNCTION AGE (.........) RETURN .... IS ...
END AGE;
(b) Show the name and the age of all the employees of the OLTP Schema using the AGE function. Make sure the age displayed is correct. Use a single SELECT command to display the data.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
