Difference between writing SQL query and stored procedure ?

Answer Posted / pratap

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.
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

Is This Answer Correct ?    13 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is sql server difficult to learn?

511


What are the various Operating system files that every SQL server 2005 database has and what is the purpose.

585


What is normalization and denormalization in sql server?

531


What does executeupdate return?

529


Why do you need a sql server?

497






Explain system rowset functions?

552


What are cascading parameters in ssrs reports?

176


What is function of ROLLUP ?

640


What is sleeping status in sql server?

512


What structure can you implement for the database to speed up table reads?

701


How to link tables in sql server?

466


What is a filestream?

548


what is nonclustered index

534


Explain collation?

613


Write a SQL query in order to merge two different columns into single column?

618