Re: Create Stored Procedure Issues with PhpMyAdmin
Posted by:
Nate Smith
Date: February 13, 2009 12:49PM
The following scenario works for me when creating stored procedures in phpMyAdmin.
Scenario for Command Line
-------------------------
What if I had a SQL script like this:
/* Start Command Line Script */
DELIMITER $$
DROP PROCEDURE IF EXISTS spTest $$
CREATE PROCEDURE spTest ()
BEGIN
SELECT 'Test' FROM DUAL WHERE 1=1;
END $$
DELIMITER ;
/* End Command Line Script */
Scenario for phpMyAdmin
-----------------------
If I wanted to run the above script in phpMyAdmin, I could do so in the following manner:
1. Go to any SQL tab in phpMyAdmin.
2. Directly below the SQL text area you'll see a text input labeled "Delimiter." In that field, enter "$$". This is the delimiter I was trying to use in the example above.
3. I can then paste in this slightly-modifed SQL script. Notice, I've removed the DELIMITER statements. phpMyAdmin handles that for me.
/* Start phpMyAdmin Script */
DROP PROCEDURE IF EXISTS spTest $$
CREATE PROCEDURE spTest ()
BEGIN
SELECT 'Test' FROM DUAL WHERE 1=1;
END $$
/* End phpMyAdmin Script */
Using this method, you can easily create and modify stored procedures in phpMyAdmin.
-Nate
Subject
Views
Written By
Posted
44042
November 13, 2006 09:44AM
16086
November 13, 2006 07:25PM
13187
November 15, 2006 10:35AM
12726
November 19, 2007 05:52PM
10291
November 20, 2007 10:27AM
8690
June 09, 2008 08:32AM
9002
November 24, 2007 11:00PM
8405
November 22, 2007 03:21AM
8113
November 22, 2007 03:24AM
7528
March 20, 2008 08:55AM
5634
August 05, 2008 10:19PM
5482
August 06, 2008 07:25AM
Re: Create Stored Procedure Issues with PhpMyAdmin
9500
February 13, 2009 12:49PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.