Updated on Kisan Patel
This tutorial will show you how to create parameter less stored procedure to return data from Sql Server database?
To create a stored procedure, follow the same step as we followed above point, now alter the default stored procedure template like this
CREATE PROCEDURE GetAllRegionDetails AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Insert statements for procedure here SELECT * FROM Region END
Here, we have removed any parameter name, replaced the SELECT
statement with selecting all columns and all records (*) from the Region database table.