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 are the rules to use the rowguidcol property to define a globally unique identifier column?
What is the most common type of join?
What gets stored inside msdb database?
What are Row versions of DataRow?
Explain the phases a transaction has to undergo?
Mention the uses of stored procedures.
How to set a database state to offline in ms sql server?
What is the current pricing model of SQL Azure?
Explain the concept of view and Types of views in SQL server?
How to use “drop” keyword in sql server and give an example?
What do you understand by user-defined function in the sql server and explain the steps to create and execute a user-defined function in the sql server?
What sql server means?
What does the update command do?
What are four major operators that can be used to combine conditions on a where clause?
How to concatenate two strings in SQL Server.