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.