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
What is merge?
What is difference between equi join and inner join?
What command is used to create a database in the sql server and how?
you accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover? : Sql server administration
Explain query editor regions
What is service broker? : sql server database administration
Write down the syntax and an example for create, rename and delete index?
What is user-defined multi-statement table-valued function?
Differentiate between SQL and ORACLE joins and write their syntax.
Can I use sql azure as a backup with log shipping or database mirroring?
How do you migrate data from mssql server to azure?
What is shared lock?
How do database indexes work?
Why normalization is used?
what is the difference between count(*) and count(1) ?