Nested Store Procedure | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Nested Store Procedure

Can we place store procedure in store procedure?
If we how many we can place? Ramesh Bandi
You can nest stored procedures and managed code references up to 32 levels.
Stored procedures can even do a nested call to themselves, a technique known as recursion. Although the nesting limit is 32 levels, Microsoft SQL Server 2005 has no limit on the number of stored procedures that can be invoked from a given stored procedure, provided that the subordinate stored procedures do not invoke other subordinate stored procedures and the maximum nesting level is never exceeded.
Check BOL topic "Nesting Stored Procedures" MohammedU.
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.

Check out Erland’s article on sharing data athttp://www.sommarskog.se
Frank Kalis
Moderator
Microsoft SQL Server MVP
Webmaster:http://www.insidesql.de
As you ask the basic question, we suggest to look at the updated books online that gives you first hand information on the subject.
quote:Originally posted by rameshbandi Can we place store procedure in store procedure?
If we how many we can place? Ramesh Bandi

Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing. The greatest discovery of my generation is that a human being can alter his life by altering his attitudes of mind.
]]>