OR REPLACE Clause
The OR REPLACE clause is used to update an existing procedure without changing any object privileges granted on it.
Example
create procedure testproc() returning char(50);
return "this is the original procedure";
end procedure;
Routine created.
call testproc();
(expression)
this is the original procedure
1 row(s) retrieved.
create procedure testproc() returning char(50);
return "this is the replaced procedure";
end procedure;
673: Another routine (testproc) with same signature already exists in database
create or replace procedure testproc() returning char(50);
return "this is the replaced procedure";
end procedure;
Routine created.
call testproc();
(expression)
this is the replaced procedure
1 row(s) retrieved.