Stored procedure without parameters
CREATE PROCEDURE SPGetEMP
AS
SELECT Id, Name , Salary
FROM Emp
RETURN
AS
SELECT Id, Name , Salary
FROM Emp
RETURN
Stored procedure with parameters
CREATE PROCEDURE SPGetEMPByID
@ID int
AS
SELECT Id, Name , Salary
FROM Emp WHERE Id = @ID
RETURN
@ID int
AS
SELECT Id, Name , Salary
FROM Emp WHERE Id = @ID
RETURN