Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2009
    Posts
    5

    Unanswered: Stored Procedures Help please

    I have made stored procedures in Oracle...but need to export them to mysql. I have searched on google but cant figure out the syntax.

    Here is the oracle procedure:


    create or replace procedure delgroup
    (g_id in number)

    is

    begin

    DELETE FROM grouptable WHERE GROUP_ID=g_id;

    commit;
    end;


    I jus basically want to delete the group from the group table..depending on which group id (the arguement) the user types in.

    How would i do this exact same procedure in mysql?

    Please some assistance guys

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    What version of MySQL are you targeting? The support for stored procedures varies considerably depending on the MySQL version.

    Recent MySQL versions have pretty good support for stored procedures. Go back even a couple of years and the stored procedure support gets sketchy.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Oct 2009
    Posts
    5

    thanks for the reply

    im using the latest version..... 5.1.39

    so any ideas on how i would convert that oracle procedure to mysql syntax?

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    MySQL 5.4 is the current version. You should probably start with the MySQL documentation for CREATE PROCEDURE. The documentation will let you know what your options are, which may affect some of the choices that you make in coding the procedure.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

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