Click here to Skip to main content
15,902,635 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi my question is Can a stored Procedure call another Stored Procedure?
Posted

Yes it can, use the EXEC statement.

Executing Stored Procedures (Database Engine)[^]

Hope it helps
 
Share this answer
 
Comments
Shah_C++ 7-Aug-13 7:58am    
We can call a stored procedure from inside another stored procedure
_Zorro_ 7-Aug-13 8:32am    
Yes, that's what I said...
And Answer is : YES

http://msdn.microsoft.com/en-us/library/ms190607.aspx[^]

SQL
CREATE PROCEDURE WrapperProc
AS
BEGIN
    EXEC NestedProc
END
 
Share this answer
 
Yeah. u can call

C++
create procedure [dbo].[InsertData]
(
@firstname varchar(30),
@lastname varchar(30),
@age int
)
as
begin
exec StoredProcedureName ---> like this u can call
 insert into persons values(@firstName,@lastName,@age)
end
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900