It may look verbose, but here it is:
create procedure drop_procedure_if_exist (in pname varchar)
{
declare stmt varchar;
declare mdta_out any;
declare res_vec_out, param_vec any;
declare sql_state, err_msg varchar;
declare num_cols_out integer;
stmt := 'SELECT * from SYS_PROCEDURES w
The rationale is the remove a stored procedure if it exists already. Anyone
knows how to do it?
Thank you very much in advance!
On Sat, Apr 18, 2015 at 1:36 PM, Gang Fu wrote:
> Thanks a lot, Marc!
>
> I want to create a procedure to drop a given procedure name if it exists:
>
> CREATE PROCEDUR
Thanks a lot, Marc!
I want to create a procedure to drop a given procedure name if it exists:
CREATE PROCEDURE drop_procedure_if_exist ( IN pname VARCHAR ) {
DECLARE pcount INTEGER;
SELECT count(*) as pcount FROM sys_procedures WHERE p_name LIKE pname;
IF (pcount>0)
DROP PROCEDURE pname;
}
But I
I have used this:
SELECT COUNT(*) FROM SYS_PROCEDURES WHERE P_NAME = :name
> Le 2015-04-11 à 08:45, Gang Fu a écrit :
>
> Hi,
>
> I want to ask how can we check the existence of a stored procedure before we
> drop it?
> We need to drop the stored procedure before we create it, otherwise, ther
Hi,
I just want to ping this question, in case it was missed
Best,
Gang
On Sat, Apr 11, 2015 at 8:45 AM, Gang Fu wrote:
> Hi,
>
> I want to ask how can we check the existence of a stored procedure before
> we drop it?
> We need to drop the stored procedure before we create it, otherwise, t