Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2004
    Location
    In cousin's house
    Posts
    303

    Unanswered: 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

  2. #2
    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

  3. #3
    Join Date
    Oct 2004
    Location
    In cousin's house
    Posts
    303
    thanks chagh LOL. It works well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •