Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use HR databse and Write a PL/SQL script that creates a user defined function which calculates the total number of employees working at a location
Use HR databse and Write a PL/SQL script that creates a user defined function which calculates the total number of employees working at a location in the country 'Canada'. Consider the "Country" as argument to be sent during the function call at rum time. Also write the appropriate call to print the returned value.
DEPARTMENTS * DEPARTMENT_ID * DEPARTMENT_NAME MANAGER_ID LOCATION_ID P LOCATIONS LOCATION_ID STREET_ADDRESS POSTAL_CODE F F F * CITY * JOB_HISTORY PF * EMPLOYEE_ID P START_DATE * END_DATE F* JOB_ID F DEPARTMENT_ID STATE_PROVINCE COUNTRY_ID F EMPLOYEES P * EMPLOYEE_ID FIRST_NAME * LAST_NAME U * EMAIL PHONE_NUMBER HIRE_DATE F* JOB_ID SALARY COMMISSION_PCT F MANAGER_ID F DEPARTMENT_ID V COUNTRIES P * COUNTRY_ID COUNTRY_NAME F REGION_ID V JOBS * JOB_ID JOB_TITLE MIN_SALARY MAX_SALARY REGIONS P * REGION_ID REGION_NAMEStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started