Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa SQL What is Stored Procedure?
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


hemant kumar
What is Stored Procedure?
1 Answer(s)      3 years and 11 months ago
Posted in : SQL


What is Stored Procedure?


Advertisement
View Answers

November 18, 2010 at 12:23 PM


Hi,

Here is the answer,

A stored procedure is a named group of SQL statements that have been previously created and stored in the server database. Stored procedures accept input parameters so that a single procedure can be used over the network by several clients using different input data. And when the procedure is modified, all clients automatically get the new version. Stored procedures reduce network traffic and improve performance. Stored procedures can be used to help ensure the integrity of the database.

e.g. sphelpdb, sprenamedb, sp_depends etc.

Syntax is-

CREATE PROCEDURE procedure_name
@param data_type = default_value,
@param data_type = default_value,
@param data_type = default_value
AS

BEGIN
   DELETE FROM  Employees
   WHERE  EmployeeId = @EmployeeId;
END


Related Tutorials/Questions & Answers:
Advertisements
 

 

 

DMCA.com