Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2011
    Location
    Sydney, Australia
    Posts
    58

    Unanswered: call stored procedure

    I've written a stored procedure as follows: I need to be able to enter a judge_id to retrieve judge_name and judge_suburb. The fields in my table are judge_id, judge_name and judge_suburb. The procedure appears to be error free.
    I now need to write a statement to call the procedure so I can test it. I'm having difficulty finding guidance for this syntax for MySQL. Can anyone point me in the right direction, please?


    delimiter //

    drop procedure if exists judge_sp //
    create procedure judge_sp
    (in judge_id int,
    out judge_name varchar(20),
    judge_suburb varchar(30))
    begin
    select judge_name into judge_name
    from judge
    where id = judge_id;
    select judge_suburb into judge_suburb
    from judge
    where id = judge_id;

    end;
    //

    delimiter ;

  2. #2
    Join Date
    Sep 2001
    Location
    Chicago, Illinois, USA
    Posts
    601
    Perhaps you would get a quicker response if you posted this question in the mySQL forum rather than the Microsoft SQL Server forum?
    Ken

    Maverick Software Design

    (847) 864-3600 x2

  3. #3
    Join Date
    Nov 2004
    Posts
    1,427
    Provided Answers: 4
    Quote Originally Posted by melgra70 View Post
    .... I'm having difficulty finding guidance for this syntax for MySQL. ....
    This is not the MySQL forum, but the SQL Server forum.
    With kind regards . . . . . SQL Server 2000/2005/2012
    Wim

    Grabel's Law: 2 is not equal to 3 -- not even for very large values of 2.
    Pat Phelan's Law: 2 very definitely CAN equal 3 -- in at least two programming languages

  4. #4
    Join Date
    Mar 2011
    Location
    Sydney, Australia
    Posts
    58
    Sorry - thanks!

Posting Permissions

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