How would i use stored techniqes in SQL?
How would i use stored techniqes in SQL?
A stored procedure in SQL is basically statements that are collected that are used as the function. We can make these put away procedure already before using it and can execute these them wherever we require and furthermore apply some contingent rationale to it. Put away systems are additionally used to lessen arrange movement and enhance the execution.
Syntax:
1. Use SET NOCOUNT ON;
2. Use fully qualified procedure name;
3. sp_executesql instead of Execute for dynamic queries;
4. Using IF EXISTS AND SELECT;
5. Avoid naming user stored procedure as sp_procedurename;
6. Use set based queries wherever possible;
7. Keep transaction short and crisp.
25 People are following this question.