ORA-06550 & PLS-00103: 遇到符号 "drop"
ORA-06550 & PLS-00103 : Encountered the symbol "drop"
这是怎么回事?
DECLARE
V_COUNT NUMBER(10) := 0;
BEGIN
SELECT COUNT(*) INTO V_COUNT FROM USER_VIEWS WHERE VIEW_NAME = 'DBO$EVT_APP';
IF V_COUNT > 0 THEN
DROP VIEW DBO$EVT_APP;
END IF;
END;
我收到以下错误:
Error report:
ORA-06550: line 9, column 5:
PLS-00103: Encountered the symbol "DROP" when expecting one of the following: ...
这对我来说似乎有效 SQL。这是我的确切代码,已粘贴。
DECLARE
V_COUNT NUMBER(10) := 0;
BEGIN
SELECT COUNT(*) INTO V_COUNT FROM USER_VIEWS WHERE VIEW_NAME = 'DBO$EVT_APP';
IF V_COUNT > 0 THEN
execute immediate 'DROP VIEW DBO$EVT_APP';
END IF;
END;
这是怎么回事?
DECLARE
V_COUNT NUMBER(10) := 0;
BEGIN
SELECT COUNT(*) INTO V_COUNT FROM USER_VIEWS WHERE VIEW_NAME = 'DBO$EVT_APP';
IF V_COUNT > 0 THEN
DROP VIEW DBO$EVT_APP;
END IF;
END;
我收到以下错误:
Error report:
ORA-06550: line 9, column 5:
PLS-00103: Encountered the symbol "DROP" when expecting one of the following: ...
这对我来说似乎有效 SQL。这是我的确切代码,已粘贴。
DECLARE
V_COUNT NUMBER(10) := 0;
BEGIN
SELECT COUNT(*) INTO V_COUNT FROM USER_VIEWS WHERE VIEW_NAME = 'DBO$EVT_APP';
IF V_COUNT > 0 THEN
execute immediate 'DROP VIEW DBO$EVT_APP';
END IF;
END;