Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to write a stored procedure in phpMyAdmin?

I am not able to find where to write the stored procedure in phpMyAdmin and how to call it using MVC architecture.

like image 789
PHP CODER Avatar asked Jul 05 '13 05:07

PHP CODER


People also ask

Where are stored procedures in phpMyAdmin?

Step -1 : Open PHP My Admin and select the database to create stored procedure. Step -2 : Go to Routines menu & Click on Add routine. Step -3 : By Clicking on Add Routine Link, PHPMyAdmin will open Pop-up. Step -4 : Follow the steps and create stored procedure.

How do I create a stored procedure in MySQL?

Create a simple stored procedure. DELIMITER ; To create the MySQL Stored Procedure, open the MySQL workbench Connect to the MySQL Database copy-paste the code in the query editor window click on Execute. You can view the procedure under stored procedures.


1 Answers

You can easily create procedures in phpMyAdmin.

  1. Go to your database. Click 'Routines' tab in header
  2. Click on 'Add routine'

enter image description here

  1. Then a popup window will be opened. In that write your procedure and click on "GO"

For example like follows. enter image description here

That's it. You can view your created procedures under 'Routines' tab itself.

enter image description here

like image 154
Krishna Mohan Avatar answered Sep 25 '22 21:09

Krishna Mohan