How do I run an SQL script and an SQL procedure?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • septus
    New Member
    • Nov 2007
    • 4

    How do I run an SQL script and an SQL procedure?

    Beginner - Needs to learn how to run an SQL script, Store the Procedure it creates and then run that procedure to populate a table.

    I am working on modifying tables within the MaNGOS project. Specifically I have a table with some Rows of data missing.

    I have an SQL file which has a script that will populate the table.

    But I don't now how to run a script in SQL. I am told if I run this script it will generate a procedure.

    I assume this procedure is to be imported to "stored procedures" within the MySQL MaNGOS project I have been working on.

    But I would not know how to run this procedure in order to populate the table.

    I hope this makes sense.

    Thank you for taking the time to read this and if you need more info please let me know.

    Septus

    *I am using MySQL 5.0 - editing tables using Navicat 8. All running in WindowsXP OS.
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Heya, Septus. Welcome to TSDN!

    Have a look at this article.

    Comment

    • septus
      New Member
      • Nov 2007
      • 4

      #3
      Hiya -

      I followed you link - Got the script imported into SQL and now it sits correctly in the Stored Procedure folder.

      Would you have a link that demonstrates how to run this procedure to alter a table within my MySQL database?

      Thanks.

      Comment

      • septus
        New Member
        • Nov 2007
        • 4

        #4
        I'll read around more and see if I can solve this next step. You have pointed me in the right direction. Thanks.

        Comment

        • pbmods
          Recognized Expert Expert
          • Apr 2007
          • 5821

          #5
          Heya, Septus.

          MySQL uses the CALL command to run stored procedures.

          Comment

          • septus
            New Member
            • Nov 2007
            • 4

            #6
            Thanks - Will read up on the call function.

            Muchos gracias

            Comment

            Working...