如何在pl / sql中的命令delete partition中传递变量名?例如:
DECLARE
x varchar2 := 'hello';
BEGIN
ALTER TABLE t1 delete PARTITION(X);
END
可能吗?
答案 0 :(得分:1)
DECLARE
x varchar2 := 'hello';
BEGIN
execute immediate 'alter table t1 delete partition('||x||')';
END;