how to create a trigger in oracle which will restrict insertion and update queries on a table based on a condition
问题 I have account table as this-- create table account ( acct_id int, cust_id int, cust_name varchar(20) ) insert into account values(1,20,'Mark'); insert into account values(2,23,'Tom'); insert into account values(3,24,'Jim'); I want to create a trigger which will ensure that no records can be inserted or update in account table having acct_id as 2 and cust_id as 23. My code is -- create trigger tri_account before insert or update on account for each row begin IF (:new.acct_id == 2 and :new