Home > Database > Mysql Tutorial > body text

How to Create Stored Procedures in phpMyAdmin Without a Delimiter Option?

DDD
Release: 2024-11-01 03:35:28
Original
608 people have browsed it

How to Create Stored Procedures in phpMyAdmin Without a Delimiter Option?

Stored Procedures in phpMyAdmin: A Workaround

For those managing MySQL databases through phpMyAdmin, the lack of a native delimiting option for creating stored procedures can be a hindrance. However, there is a workaround to manually set the anchor and execute the procedure creation statement.

To achieve this, follow these steps:

  1. Access phpMyAdmin and select your database.
  2. Navigate to the SQL tab.
  3. Copy the MySQL statement that creates the procedure, ensuring to remove the DELIMITER statements.
  4. In the delimiter field located just below the SQL editor, enter $$ as your delimiter.
  5. Paste the edited SQL statement into the editor and click "Go."

Here's an example of the modified SQL statement:

DROP PROCEDURE IF EXISTS spFoo;
CREATE PROCEDURE spFoo ()
BEGIN
    SELECT 'Foo' FROM DUAL;
END;
Copy after login

By following these steps, you can successfully create stored procedures in phpMyAdmin even without the nativeDELIMITER option. For further guidance, refer to the following resource:

[http://blog.nth-design.com/2009/02/25/creating-sp-in-phpmyadmin/](http://blog.nth-design.com/2009/02/25/creating-sp-in-phpmyadmin/)

The above is the detailed content of How to Create Stored Procedures in phpMyAdmin Without a Delimiter Option?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!