PL/SQL block to classify people based on ages
Q. Write a PL/SQL block to accept the age of the user, based on the following conditions:
age <13 years child?
age >= 13 years and <20 years, TeenAge?
age >= 21years, Adult?
The following code will display
DECLARE age number:=&user_age;
BEGIN IF (age<13) THEN USER:='Child';
AND (age<20) THEN USER:='TeenAge';
dbms_output.put_line('User is '||USER);