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

How will you monitor replication latency in transactional replication? : sql server replication

620


What is parameterized reports in ssrs ?

105


How except clause is differs from not in clause?

540


What happens if you insert a duplicate key for the primary key column in ms sql server?

537


Explain about builtinadministrator?

610






Explain tablesample?

557


Do I need a report server to run reports in my application?

106


Why use update_statistics command in sql server?

567


How to add more data to the testing table in ms sql server?

558


How data can be copied from one table to another table?

517


What is use of attributehierarchyenabled? : sql server analysis services, ssas

618


What is the difference between dataadapter and datareader?

551


What are the requirements for sql server 2016?

547


What is entity data services?

587


ow to bring suspect mode datbase online from scratch

1415