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 > all stored procedure with OUT parameter

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-21-05, 22:59
popskie popskie is offline
Registered User
 
Join Date: Oct 2004
Location: In cousin's house
Posts: 303
all stored procedure with OUT parameter

hi,
How to call a mysql stored procedure with OUT parameter.
i.e.
Code:
create procedure spname (in par1 int,out part2 int)
begin
////
end
thanks,
POpskie
Reply With Quote
  #2 (permalink)  
Old 11-22-05, 07:05
Chagh Chagh is offline
Registered User
 
Join Date: May 2005
Posts: 127
hi,
you should define a session variable in mysql client and put it in the SPs parameter list and then select it.
e.g.
Code:
call spname(4, @a);
select @a;
and in another sp you should define an ordinary local variable and put it instead of your out prameter, then you can do any calculation you want with that variable.

goodluck
--Chagh
Reply With Quote
  #3 (permalink)  
Old 11-22-05, 20:02
popskie popskie is offline
Registered User
 
Join Date: Oct 2004
Location: In cousin's house
Posts: 303
thanks chagh LOL. It works well.
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