Create a stored procedure that prints the list of the locations(locat ion_id,street_a ddress,city,cou ntry_name) from the locations table sorted by location id in ascending order along with the total number of employees working at the listed locations. Write an anonymous block that invokes the created stored procedure
Create a stored procedure
Collapse
X
-
Tags: None
-
That you can handle by a simple select query itself, you dont need a stored procedure for that:
something like:
[code=oracle]
SELECT location_id,str eet_address,cit y,country_name, (SELECT COUNT(*) FROM emp_table WHERE location_id = l.location_id) emp_count FROM
locations_table l
order by location_id
[/code]Comment
Comment