If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Execute stored procedure from another stored procedure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-07-05, 11:46
cstevio cstevio is offline
Registered User
 
Join Date: Feb 2004
Posts: 17
Execute stored procedure from another stored procedure

Hi,

Does anybody know what the syntax is for executing a stored procedure from within another stored procedure?

IE. execute SP2 inside SP1

Many thanks in advance
Reply With Quote
  #2 (permalink)  
Old 11-08-05, 08:44
Chagh Chagh is offline
Registered User
 
Join Date: May 2005
Posts: 127
hi,
you can call an SP from within another SP just like calling it from MySQL client. but instead of passing session variables as SP parameters you can use local variables that have been declared in your parent SP.
just call your SP like this:
Code:
call spName(parameters);
Regards
Chagh
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On