How to Recompile the Stored Procedure in SQL Server?
How to Recompile the Stored Procedure in SQL Server?
I completed my post-graduation in 2013 in the engineering field. Engineering is the application of science and math to solve problems. Engineers figure out how things work and find practical uses for scientific discoveries. Scientists and inventors often get the credit for innovations that advance the human condition, but it is engineers who are instrumental in making those innovations available to the world. I love pet animals such as dogs, cats, etc.
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.