Procedure to display the Employees of a specific Department

Create a stored procedure, to display the lastnames as "Name" from the employee table. The requirement is as below: The name of the Procedure : EmployeesDept

Name of the argument as Input : DeptNo

Write the code to create the procedure

Schema

I wrote the Query like this but i didnt get expected output

CREATE  PROCEDURE Employeesdept(@Deptno varchar)
AS
Begin
SELECT lastname as name
from employee
where workdept= 'D21'
end

Expected output:

Name --------------- Pulaski Jefferson Marino Smith Johnson Perez Monteverde Name ---------------

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum