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
How will you monitor replication latency in transactional replication? : sql server replication
What is parameterized reports in ssrs ?
How except clause is differs from not in clause?
What happens if you insert a duplicate key for the primary key column in ms sql server?
Explain about builtinadministrator?
Explain tablesample?
Do I need a report server to run reports in my application?
Why use update_statistics command in sql server?
How to add more data to the testing table in ms sql server?
How data can be copied from one table to another table?
What is use of attributehierarchyenabled? : sql server analysis services, ssas
What is the difference between dataadapter and datareader?
What are the requirements for sql server 2016?
What is entity data services?
ow to bring suspect mode datbase online from scratch