Question: Complete the following function Number_of_Dependents that has one input parameter called ssn that stores a SSN of some employee, and when called, it will return

Complete the following function Number_of_Dependents that has one input parameter called ssn that stores a SSN of some employee, and when called, it will return the number of dependents the employee has. For example, is the function receives the SSN 333445555, then the function returns 3: (4 points)

 

 Note:   Your function should work for any SSN passed to the function.     

 

 

create or replace function Number_of_Dependents(ssn CHAR) return INTEGER

AS

 

 

 

begin

 

 

 

 

 

 

 

 

 

end;

 

 

 

2- Write an anonymous block to test the above function using the SSN 333445555 or using any other SSN. Format the output like this assuming that the SSN used is 333445555: 

 

                 This employee has 3 dependent(s)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Completed Function and Test Script 1 Completed Function CREATE OR REPLACE FUNCTION NumberofDependent... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!