不允許我已經創建sequnce prac_seq:ORACLE 12C - ORA-02287:序列號這裏
CREATE SEQUENCE prac_seq
START WITH 300
INCREMENT BY 10;
而且我想用它執行以下操作:
UPDATE pracownicy
SET placa_dod = prac_seq.CURRVAL
WHERE id_prac = prac_seq.CURRVAL;
然後我得到一個錯誤被稱爲:
Error report - SQL Error: ORA-02287: sequence number not allowed here 02287. 00000 - "sequence number not allowed here" *Cause: The specified sequence number (CURRVAL or NEXTVAL) is inappropriate here in the statement. *Action: Remove the sequence number.
爲什麼我不能使用上面的序列?
你爲什麼想要? –
不允許在'where子句中引用一個序列。 –
[ORA-02287:序列號在這裏不允許]可能的重複(https://stackoverflow.com/questions/41155090/ora-02287-sequence-number-not-allowed-here) –