Create a stored procedure called sp_phonelist on the SQL Server. This stored pro
ID: 3821131 • Letter: C
Question
Create a stored procedure called sp_phonelist on the SQL Server. This stored procedure will list the first name, last name, department and phone number of all employees in the EMPLOYEE table sorted by last name within department (20 points)NOTE: The EMPLOYEE table should be the table you created in SQL #2 Assignment - the WPC database Create a stored procedure called sp_phonelist on the SQL Server. This stored procedure will list the first name, last name, department and phone number of all employees in the EMPLOYEE table sorted by last name within department (20 points)
NOTE: The EMPLOYEE table should be the table you created in SQL #2 Assignment - the WPC database Create a stored procedure called sp_phonelist on the SQL Server. This stored procedure will list the first name, last name, department and phone number of all employees in the EMPLOYEE table sorted by last name within department (20 points)
NOTE: The EMPLOYEE table should be the table you created in SQL #2 Assignment - the WPC database
Explanation / Answer
to create
CREATE PROCEDURE getEmployees
AS
SELECT first_name,last_name,department,phone from EMPLOYEE sort by last_name group by department
to execute
EXEC getEmployees