DECLARE
AN_FLAG NUMBER;
BEGIN
SELECT COUNT(1)
INTO AN_FLAG
FROM ALL_OBJECTS
WHERE OBJECT_TYPE = 'PROCEDURE'
AND OWNER = 'XX用户'
AND OBJECT_NAME = 'P_test';
IF AN_FLAG > 0 THEN
EXECUTE IMMEDIATE 'DROP PRCOEDURE db_user.P_test';
END IF;
END;
报错:ORA-00950: 无效 DROP 选项
======
DBA用户了,DROP ANY PROCEDURE权限也有,莫名奇妙,不是这样写吗?
DROP?PRCOEDURE 无效?DROP?选项
------解决方案--------------------
db_user是什么???