This statement can be used to change the characteristics of a stored procedure. More than one change may be specified in an ALTER PROCEDURE statement. However, you cannot change the parameters or body of a stored procedure using this statement; to make such changes, you must drop and re-create the procedure using DROP PROCEDURE and CREATE PROCEDURE.
DELIMITER // drop PROCEDURE Proc_CreateUniqueIndex; create PROCEDURE Proc_CreateUniqueIndex() BEGIN declare tb_name varchar(50); declare done int DEFAULT 0; declare cur1 CURSOR FOR SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'erp_track' ;
drop PROCEDURE Proc_CreateUniqueIndex;
create PROCEDURE Proc_CreateUniqueIndex()
BEGIN
declare tb_name varchar(50);
declare done int DEFAULT 0;
declare cur1 CURSOR FOR SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'erp_track' ;