我正在嘗試關注此guide以創建pl/sql
塊,我在SET orderNumberSEQ...
上得到ORA-00922:缺失或無效選項。我究竟做錯了什麼?在pl/sql塊中聲明變量
declare
orderNumberSEQ number(5);
userid varchar(20);
begin
insert into bs_orders (userid, ono, timepurchased)
values('lilith', orderNum_seq.NEXTVAL,(SELECT current_timestamp FROM dual));
SET orderNumberSEQ := orderNum_seq.CURRVAL;
SELECT userid FROM bs_orders
where ono = orderNumberSEQ;
end;
/
對每個通知+1 – zerkms