SELECT Stored Procedure - Select Stored Procedures in SQL Server
SELECT Stored Procedure
- ALTER PROCEDURE using SELECT
Demo wikitechydatabase
- Below is a selection from the wikitechytable table used in the examples:
Example
- ALTER PROCEDURE using SELECT
ALTER PROCEDURE GetDataSP ( @id INTEGER @name VARCHAR(10), @course VARCHAR(10), @fees INTEGER, @StatementType NVARCHAR(20) = '' ) AS BEGIN BEGIN IF @StatementType = 'Select' SELECT * FROM wikitechytable END END
Output
Execute PROCEDURE using SELECT
EXEC GetDataSP @id=10, @name='Venkat', @course = 'flutter' , @fees=150, @StatementType = 'Select';