Easy to Modify: Any user can easily modify the stored procedure with the help of ALTER TABLE command.Re-usability of the code minimizes the development time. Reusable: Stored procedure can be used by multiple users without writing the same SQL code repeatedly.Stronger Security: The stored procedure provides high security because it restricts the users from accessing the data from the tables directly.Reduced Network Traffic: The stored procedure minimizes the network traffic between the application and the database server because instead of sending many lines of SQL code, the application only needs to pass the name and parameter of the stored procedure to the database server.The following syntax is used to create the simple stored procedure in Structured Query Language:ĮXEC Show_Particular_Course_Student = 'B.tech', = 20 įollowing are the important benefits or advantages of stored procedure in Structured Query Language: SQL database server does not allow developers to interfere with system stored procedures. SQL database server creates and executes the system stored procedures for administrative activities. Net Framework, which execute in the memory of the SQL database server. This stored procedure manages INSERT, UPDATE, and DELETE statements with or without parameters and gives the row data in the output.ĬLR stored procedure is that stored procedure which is created by the combination of CLR (Common Language Runtime) and another stored procedure written in a CLR-based language like C# and VB.NET.ĬLR procedures are the objects of. The Transact-SQL procedure accepts the parameters and returns them. User-Defined stored procedure is further categorized into the following two types: This type of stored procedure provides one or more SQL statements for retrieving, updating, and deleting values from database tables. User-defined Stored Procedures are created by the database developers and administrators and stored in the current database. Types of Stored Procedureįollowing are the two types of Stored Procedures in SQL: The plan is reused by SQL Server, which executes the stored procedure quickly with reliable performance. SQL database creates an execution plan and stores it in the cache memory when the stored procedure is called for the first time. It is a subprogram consisting of a name, a list of parameters, and Transact-SQL statements.Īny user can store the stored procedure as a named object in the SQL database and can call it by using triggers, other procedures, and other programming applications such as Java, PHP, R, C#, Python, etc. A stored procedure in Structured Query Language is a group of logical statements stored in the database for performing a particular task.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |