–write a function where if the user gives option 1-4 and employee_id it will return the name in any format
Function name: custom_name
parameter (in): options,employee_id
data type: number
return: name in each of the format
–Use Pl/sql
–select inside the function
–to test type
select
custom_name(1,199) as fullname1
,custom_name(2,199) as fullname2
,custom_name(3,199) as fullname3
,custom_name(4,199) as fullname4
from dual;
select employee_id, last_name, first_name, gender
,custom_name(1,employee_id) as fullname1
,custom_name(2,employee_id) as fullname2
,custom_name(3,employee_id) as fullname3
,custom_name(4,employee_id) as fullname4
from employees;
Good answers im new to coding
feel a bit stupid trying to see if i should code in the future or not
Rhema Efik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.