How to Recompile the Stored Procedure in SQL Server?
How to Recompile the Stored Procedure in SQL Server?
44821-Oct-2021
Updated on 21-Oct-2021
Home / DeveloperSection / Forums / How to Recompile the Stored Procedure in SQL Server?
How to Recompile the Stored Procedure in SQL Server?
Steilla Mitchel
08-Nov-2021Recompile the Stored Procedure:
If you create a stores procedure in SQL Server and execute it then it always in compiled form after it only you have need to execute it. Sometimes cases are generated in that we need to recompile our stored procedure. There are two simple way to recompile the stored procedure like as-
Lets create a Stored Procedure
1- The following method is used to recompile the stored procedure as well as execute it. By using this method you can recompile your stores procedure while you execute it,
If you want to only execute the stored procedure then use the following SQL statement
2- The second method is only you can recompile your stored procedure here stored procedure is not execute. The following SQL statement is used to recompile the stored procedure,
So you understand differences between above two methods for recompiling of stored procedure. In the first method procedure is recompile as well as execute also and in the second method stored procedure only being recompiles.