Here is a simple example demonstrating this limit:
CREATE PROCEDURE recurseProc (@cnt int) AS BEGIN PRINT @cnt; SET @cnt += 1; EXEC recurseProc @cnt; END; GO EXEC recurseProc 1;
When you execute this code, you get an error after 32 recursions are over Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32).
Note: You can work around this limitation by using a Common Table Expression. A CTE allows up to 100 levels of recursion.