超出了存储过程、函数、触发器或视图的最大嵌套层数(最大层数为 32)
CREATE PROC em_cursor @em_cursor cursor VARYING OUTPUTAS
BEGIN
SET @em_cursor=CURSOR FORWARD_ONLY STATIC
FOR
SELECT *
FROM Employees
OPEN @em_cursor
END
DECLARE @MyCursor cursor
EXEC dbo.em_cursor @em_cursor=@MyCursor OUTPUT
WHILE(@@FETCH_STATUS=0)
BEGIN
FETCH NEXT FROM @MyCursor
END
CLOSE @MyCursor
DEALLOCATE @MyCursor
我在执行了以上语句就报错:超出了存储过程、函数、触发器或视图的最大嵌套层数(最大层数为 32)
这是什么情况啊,请指教