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

正文內(nèi)容

oracle異常及觸發(fā)器(編輯修改稿)

2025-02-23 07:38 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 ode和 sqlerrm先被賦值給本地變量 , 然后這些變量在 sql語(yǔ)句中被使用 , sqlcode和 sqlerrm不能直接在 sql語(yǔ)句中使用 , 因?yàn)樗麄兪沁^(guò)程性的函數(shù) 。 sqlcode返回當(dāng)前的錯(cuò)誤號(hào) , sqlerrm返回當(dāng)前的錯(cuò)誤信息正文 。 – – 7 代碼 消息 使用的sqlerrm函數(shù) 0 ora0000:normal,successful pletion sqlerrm(0) +100 Ora1403:no data found sqlerrm(100) +10 Userdefined exception Sqlerrm(10) null ora0000:normal,successful pletion sqlerrm 1 Ora0001:unique constraint(.) violated Sqlerrm(1) 54 Ora00054:resource busy and acquire by nowait specified Sqlerrm(54) 8 – Exception_init – 可以將一個(gè)經(jīng)過(guò)命名的異常情態(tài)與一個(gè)特別的 oracle錯(cuò)誤相聯(lián)系 。這樣可以用 w h e n 撲獲此錯(cuò)誤 , 不用 o t h e r s 撲獲 。 通過(guò)exception_init pragma實(shí)現(xiàn)的 。 其語(yǔ)法如下: – Pragma exception_init (exception_name,oracle_error_number) – Pragma必須在聲明部分 – 例:下面的例子在運(yùn)行時(shí)刻如遇到 “ ora1400: mandatory not – null column missing or null during insert” 錯(cuò)誤時(shí) , 將引發(fā)e_missingnull異常情態(tài) 。 – Declare – e_missingnull exception。 – pragma exception_init (e_missingnull,1400)。 – Begin – insert into students(id) values(null)。 – Exception – when e_missingnull then – insert into log_table(info) values(‘ ora1400 occurred’ )。 – End。 9 – 每次發(fā)生 pragma exception_init時(shí),一個(gè) oracle錯(cuò)誤只能和一個(gè)用戶定義的異常情態(tài)相關(guān)聯(lián)。在異常處理器內(nèi)部, sqlcode和 sqlerrm將返回發(fā)生 oracle錯(cuò)誤的代碼和錯(cuò)誤信息,而不會(huì)返回用戶定義的消息。 – 例: – Declare – ex_hfy exception。 – Pragma exception_init(ex_hfy,1400)。 – Begin – insert into students values(null)。 – Exception – when ex_hfy then – (39。不能把空值插入到非空列 39。)。 – End。 – 注意,這里 1400不能為別的,因?yàn)榘芽罩挡迦氲椒强樟械腻e(cuò)誤號(hào)就是這個(gè)??梢詥为?dú)執(zhí)行 insert語(yǔ)句查看錯(cuò)誤號(hào)。 10 ?使用 raise_applic
點(diǎn)擊復(fù)制文檔內(nèi)容
試題試卷相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1