錯誤:問題運行示例SQL
ORA-06550: line1, column 22: PLS-00103 Encountered the symbol "end-of-file" when expecting one of the following: * & = - + .......
PL/SQL塊:
DECLARE v_c number :=0;
BEGIN
SELECT COUNT(*) into v_c from all_sequences where sequence_name='TEST_SEQ' and sequence_owner='test';
IF v_c = 1 THEN
execute immediate 'DROP SEQUENCE test.TEST_SEQ';
END IF;
END;
/
爲什麼立即執行?爲什麼不只是做'那麼滴序列...'? – qJake
@spikeX,你不能在PL/SQL塊中執行DDL。 – Ben
此外,在問題中增加一點解釋或細節可能會有所幫助。不要只粘貼代碼。 – qJake