USE Adventureworks
--Create a new procedure for querying
CREATE PROCEDURE HumanResources.GetEmployeeName
AS
SELECT LastName,FirstName,Department FROM HumanResources.vEmployeeDepartment
GO
--when you finish your procedure,you can test it by the command 'EXEC'
EXEC HumanResources.GetEmployeeName
--Then the result of the procedure will be displayed follows