Stored Procedure is code in SQL which stored as object in a DB Server. It is group of one or more SQL statements.
It can accept parameter so that procedure can return values based on parameter. You can pass the one or multiple parameter.
Main Point of Stored procedure are follows:
Creating Stored Procedure
Syntax:
CREATE PROCEDURE PROCEDURE_NAME
(Parameter_name 1 Datatype,
Parameter_name 2 Datatype,….)
AS
BEGIN
SQL_Statement
END
Executing Stored Procedure
Syntax:
EXEC PROCEDURE_NAME
Example :
There is created “Student” Table in a database.
The Following SQL statement creates Stored procedure to get “Student” Records based on “ID” and “Qualification” parameters.
CREATE PROCEDURE SP_GETStudent_Records
(@Id int, @qualification varchar(20))
AS
BEGIN
SELECT * FROM STUDENT where Studentid=@ID AND Qualification=@qualification
END
Executes the above created stored procedure by using below statement:
EXEC SP_GETStudent_Records 1,'10th'
Output :
If you want to sell your readymade software to the genuine clients or businessman, list your software with details and demo links.
Clients will find it using our advanced search filter and will contact you directly.
No any charge for the product lsiting.