Creating a Single-Statement Procedure
mysql>
mysql>
mysql> create procedure myProc ()
-> SELECT id,first_name FROM employee;
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> call myProc ();
mysql>
mysql> drop procedure myProc;
Query OK, 0 rows affected (0.00 sec)
Related examples in the same category