Example:
Objective: In this example, we will modify the existing store procedure. We will use the email address as the input parameter instead of ecode.
ALTER PROCEDURE SP_TEXAS_R(@email as varchar(20)) As Begin
SELECT e.FirstName, e.LastName , e.Emailaddress, P.Project FROM Tbl_Emp as e INNER JOIN Tbl_Project as p on e.ecode = p.ecode WHERE e.emailaddress= @email
End
Execute store procedure:
EXEC SP_PR @email = ‘cynthia.randall@it.frc.com’;
Output: