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 federation member?
Can we create clustered index on composite key?
What is a not null constraint?
Does table partitioning improve performance?
Where in ms sql server is ’100’ equal to ‘0’?
What is 3nf normalization?
How should i optimize the time for execution of stored procedure having single input and many output from the different tables?
What is normalization process?
When we should use @@error?
your sql server is running out of disk space. You notice that there are several large files with ldf extensions what are these files? : Sql server administration
How can we solve concurrency problems?
What is the dbcc command and why is it used?
How to add a new dsn with the odbc driver for sql server?
What is difference between createstatement and preparedstatement?
What is the Difference Between Primary and Foreign Key?