Lets have one example for same:
Let's suppose you want a stored procedure to return a list of all the people with a given last name. The code for the stored procedure might look like this:
CREATE PROCEDURE dbo.GetPeopleByLastName (@LastName NVARCHAR(50))
AS
SELECT ContactID,
FirstName,
LastName
FROM Person.Contact
WHERE LastName = @LastName
ORDER BY ContactID