日期:2014-05-17 浏览次数:20888 次
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;