有沒有辦法在where子句中獲得currval
? 我試圖檢查id = currval
。我已經試過如下:在where子句中使用currval
insert into order values(
orderid_seq.nextval,
SYSDATE ,
&quantity,
&student_number,
&room_number,
&menu_item ,
(select item_cost * order_quantity
FROM order_stock,order
WHERE order_stock.menu_item =
order.menu_item and
order_id = orderid_seq.currval
));
當你嘗試過時發生了什麼?你正在運行哪個數據庫? – lit