IT Tutorial

What is the Stored Procedure and Why Stored Procedure ?


In this article I will tell about the Stored Procedure which should be used in large projects.

I think it should definitely be used in large-scale projects because the difference of Stored procedures only occurs in projects that require large-scale performance and efficiency.



Stored procedure in general, we can describe as follows: SQL statements which is not needed to compile after first compilation and keeps in the database server. On the other hand, we can say T-SQL statements stored in Database server instead of Application layer.

Stored procedures, as in other programming languages, can be run without parameters. It is also called SP when using in application development. All database operations can be done with Stored procedures.


One of the most beautiful features of using stored procedures is perhaps seperate the programming language codes from the DML (Database manipulation Language) database queries. In addition, once you have written and compiled a SP you can use many times.

In general, I will state the advantages of Stored procedures and why they are used too much as following.



I have explained the advantages of Stored procedures that came to my mind above. Almost all of the software applications do not use normal sql codes in general.

As I said above, being managed from a single point and using it in more than one place and not being able to see other people easily makes SPs very advantageous.


Especially when we think about Network traffic, sending many lines SQL commands sent by the client to the server instead of sending the name of the Stored Procedure to the server one time it means that Network traffic is very relieved.


There are Four types of Stored Procedures.

  1. System Stored Procedure :  they are in the master database and sp_ prefix is used for these stored procedures. They are used in system-related administrative jobs on the database.
  2. User based Stored Procedure :  These stored procedures are used for our applications. You can delete or change these SP.
  3. Extended Stored Procedure :  Generally, it is compiled like .dll and a type of stored procedure that compiles the Database Server’s functionality. it is added only to the master database.
  4. CLR Stored Procedure : It is a kind of Stored procedure developed in CLR environment using any language.




Do you want to learn Microsoft SQL Server DBA Tutorials for Beginners, then read the following articles.

 1,751 views last month,  5 views today

Exit mobile version