CREATE PROCEDURE ppg_gc (IN expiryTime INTEGER, IN batchSize INTEGER)
LANGUAGE SQL
MODIFIES SQL DATA
BEGIN
declare v_stmt varchar(20);
--now store ur query inside this variable,then prepare the statement.
v_stmt = 'alter table emp drop primary key';
prepare S1 from v_stmt;
EXECUTE IMMEDIATE S1;
END @
ref
1 comment:
how this can be done in sql server as these commands does not work
Post a Comment