SQL Server Performance

Nested Store Procedure

Discussion in 'Getting Started' started by rameshbandi, May 6, 2007.

  1. rameshbandi New Member

    Can we place store procedure in store procedure?
    If we how many we can place?

    Ramesh Bandi
  2. MohammedU New Member

    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.
  3. FrankKalis Moderator

  4. satya Moderator

    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.

Share This Page