You must Sign In to post a response.
  • Category: SQL Server

    Is it possible to call stored procedure inside stored procedure

    Is it possible to call stored procedure inside stored procedureIs it possible to call stored procedure inside stored procedure ...Example..
  • #743900

    Hi,

    Yes it is possible to call one stored procedure in another stored procedure here is Sample code for your reference
    //Procedure 1
    Create proc sp_Test1
    as
    begin
    select * from table
    end

    //Procedure 2
    create proc sp_Test2
    as
    begin
    exec sp_Test1
    end

  • #743902

    Hai Rajanikant,
    Yes, It is possible to call stored procedure inside another stored procedure.
    In real-time this is very common to call multiple stored procedure inside the main stored procedure and achieve the requirements.
    In general we have a main stored procedure and few stored procedure will be inside to get some data used by the main stored procedure.
    So it is possible to have the nested stored procedures.
    Hope it will be helpful to you.


    Regards,
    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)
    pawansoftit@gmail.com

  • #743911
    Yes, its possible to call SP inside another SP. you just pass the required parameters when you call that SP in your procedure that's enough.

    Hope you understood...

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/

  • #743918
    Yes you can easily call any stored procedure inside another stored procedure.

    Are you having any issue.?

    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM

  • #743920
    @Anil Kumar Pandy :No..i got this quotation in the interview today....
    @To all : Thank u

  • #743924
    hii,

    You can call a stored procedure with in another stored procedure.
    And this approch is majorly used in the world of development.

    Hope this helps you

    Regards
    Shalini

  • #744038
    HI..

    Yes, It is possible to cal a stored procedure with in another stored procedure


  • Sign In to post your comments