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 type of Index will get created after executing the above statement?
Write a program using SQL queries to find a unique entry in a table.
What is 2nf in normalization?
How to connect sql server management studio express to sql server 2005 express?
What is ddl command?
What is database dimension? : sql server analysis services, ssas
What is CTE in SQL
you want to be sure that queries in a database always execute at the maximum possible speed. To achieve this goal you have created various indexes on tables which other statement will keep the database in good condition? : Sql server administration
What is a sql join?
What are advantages of ssrs or why we should use ssrs?
Explain a join?
What is a data source file?
What is query cost in sql server?
How do I uninstall sql server 2014?
You accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover?