Comments - CREATE PROCEDURE

7 years, 2 months ago Karl Levik

You have neglected to mention the amazing, awesome OR REPLACE feature, which seems to have been available since 10.1.4, see: https://jira.mariadb.org/browse/MDEV-5359

delimiter ;;
create procedure foo(param1 int unsigned) contains sql begin select param1; end;;
delimiter ;
call foo(1);
+--------+
| param1 |
+--------+
|      1 |
+--------+
1 row in set (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

delimiter ;;
create or replace procedure foo(param1 int unsigned) contains sql begin select param1, 2; end;;
delimiter ;
call foo(1);
+--------+---+
| param1 | 2 |
+--------+---+
|      1 | 2 |
+--------+---+
1 row in set (0.00 sec)

Query OK, 0 rows affected (0.00 sec)
 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.