日期:2014-05-16 浏览次数:20792 次
CREATE OR REPLACE
PROCEDURE p_test(
in_view_name IN VARCHAR2)
AS
flg NUMBER;
sqlstr VARCHAR2(100);
BEGIN
SELECT 1 INTO flg FROM all_views WHERE view_name = in_view_name;
IF SQL%FOUND THEN
sqlstr:='drop view '
------解决方案--------------------
in_view_name;
EXECUTE immediate sqlstr;
END IF ;
EXCEPTION
WHEN no_data_found THEN
dbms_output.put_line('The view does not exist');
END ;