SQL Server Error Msg 124 – CREATE PROCEDURE contains no statements

In this blog post, let’s learn about the error message “124 – CREATE PROCEDURE contains no statements.” in Microsoft SQL Server, the reason why it appears and the solution to fix it.

SQL Server Error Message

124 – CREATE PROCEDURE contains no statements.

Reason for the Error

SQL Server Error Msg 124 occurs when you attempt to create a stored procedure with no executable statements. In other words, when you create a stored procedure, it must contain at least one SQL statement to be executed when it is called. If you attempt to create a stored procedure without any executable statements, SQL Server will return Error Msg 124.

Solution

To fix this error, you need to ensure that your stored procedure contains at least one SQL statement that can be executed when the procedure is called.

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this blog post, let’s learn about the error message “1459 – An error occurred while accessing the database mirroring...
In this blog post, let’s learn about the error message “7937 – Columnstore index has one or more missing column...