Hello! Help to write (yes, there is nothing special to write about) the simplest procedure, so that it is preserved, and not just a query. There is a table, you just need to pull out all the fields ... What is wrong with me? really needed)

CREATE PROCEDURE SelectPerson BEGIN SELECT * FROM Person END 
  • one
    This is called a stored procedure - AseN

1 answer 1

 DELIMITER // CREATE PROCEDURE `SelectPerson` () LANGUAGE SQL DETERMINISTIC SQL SECURITY DEFINER COMMENT 'Some proc!' BEGIN SELECT * FROM Person; END 

Writing stored procedures is well described here .


In PHPMYADMIN there is a system database - mysql . It stores various parameters, including a table with stored procedures - proc . Therefore, to get all stored procedures on the server, you need to execute such a query (procedure names are stored in the name field):

  SELECT name FROM mysql.proc 
  • it’s still an error (syntax; syntax; BEGIN SELECT * FROM Person END 'at line 1 - wicS
  • anyway not like that (((syntax; syntax; wicS
  • Sorry. Now everything works fine. - AseN
  • one
    Thanks a lot! And tell me where else in phpmyAdmin, you can somehow see what stored procedures are there? - wicS
  • Completed the answer. - AseN