Jump to content
Sign in to follow this  
zac001

Oracle Trigger/pl Sql

Recommended Posts

Contohnya katalah input data bagi jantina lelaki sebagai 'L' atau 'l' atau 'm' atau 'M', katalah data tu akan masuk dalam table user_profile. Aku perlu buat sesuatu seperti trigger supaya tukar data tu kepada 'M'. Setahu aku kalau guna trigger ni kalau input data masuk ke table user_profile trigger akan update atau tambah pada table lain contohnya table input_log.

Edited by zac001

Share this post


Link to post
Share on other sites
ble xplain lg x soklan ko ni? kureng paham la ape yg ko nk.
setahu aku trigger ni gune nya bl ko nk wat sesuatu sblm or selepas
ko insert, update, or delete data from table.

contoh: kata kn ko nk delete data dr table A, tp sblom delete ko nk amek data
tu dan masukkan dalam table history, ko ble gune trigger before delete ( row level trigger klu xslp aku ).

mcm yg ko nk ni, ni mengikut ape yg aku paham la, ko leh gune before insert or update trigger. so maknenya
sebelom ko insert or update table tu, trigger ni akan setkan jantina kepada 'L' / 'M'.

tp hati2 sbb kadang2 ble timbul isu mutating table.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...