freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

java存儲過程和觸發(fā)器(24)-資料下載頁

2024-10-16 16:16本頁面
  

【正文】 d_id = 100 ? select * from s_ord where id = 100 169。 Dr. Philip Cannata Data Management 20 Java Triggers Think about what it would take to have triggers for update and delete of items. 169。 Dr. Philip Cannata Data Management 21 Java Triggers Why can’t we just do this? create or replace and pile java source named sgTriggerMethods as import .*。 import .*。 public class sgTriggerMethods{ public static void changeTotalForItemInsert(String ord_id, int price, int quan) throws SQLException { Connection conn = (jdbc:oracle:kprb:@)。 String query = update s_ord set total = (select sum(price * quantity) from s_item where ord_id = ?) where id = ? 。 PreparedStatement pstatement = (query)。 (1, ord_id)。 (2, ord_id)。 ()。 } } / 169。 Dr. Philip Cannata Data Management 22 Java Triggers To try out the trigger do the following: ? drop sg tables ? create sg tables ? recreate the trigger ? insert into s_item values(100,8,50536,125,1,null) 169。 Dr. Philip Cannata Data Management 23 Java Triggers The Dreaded Mutating Table Problem insert into s_item values(100,8,50536,125,1,null) * ERROR at line 1: ORA29532: Java call terminated by uncaught Java exception: : ORA04091: table is mutating, trigger/function may not see it ORA04088: error during execution of trigger 39?!?The problem is a trigger can’t make reference to the table being changed. String query = update s_ord set total = (select sum(price * quantity) from s_item where ord_id = ?) where id = ? 。 Problem! 169。 Dr. Philip Cannata Data Management 24 Java Stored Procedures Write some code
點擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1