execute procedure with parameters code example
Example 1: sql server execute stored procedure with parameters
CREATE PROCEDURE dbo.uspGetAddress @City nvarchar(30) AS
SELECT * FROM Person.Address WHERE City = @City
EXEC dbo.spGetAddress @City = 'Bordeaux'
Example 2: create select stored procedure in sql server
CREATE PROCEDURE sp_getRaces
AS
BEGIN
SELECT * FROM dbo.Races
END ;