我需要将一个序列值分配给一个变量,以便在序列值增加后稍后使用。我已经尝试过了,但它给出了一个错误:
variable imageID number;
select SEQ_IMAGE_ID.CURRVAL into :imageID from dual;
select * from IMAGES where IMAGE_ID = :imageID;
Error starting at line 2 in command:
select SEQ_IMAGE_ID.CURRVAL into :imageID from dual
Error report:
SQL Error: ORA-01006: bind variable does not exist
01006. 00000 - "bind variable does not exist"
我已经三次检查序列名称是否正确,有什么想法吗?