Another constraint question...
I need to do a table level constraint that does...
in the acct table...if acct_type is "1" then acct_bal must be > 0, if acc_type is "2" then acct_bal must be > 100, etc..
All the fields are within the same table.
write a trigger before insert for each row
It is better to ask and appear ignorant, than to remain silent and remain ignorant.
Oracle OCP DBA 9i,
C++, Java developer
I am not allowed to use a trigger for this part...this is a class assignment. I found out today that my entire class is stuck on the same part.
ALTER TABLE my_table ADD CONSTRAINT check_acct_bal
CHECK (acct_type = '1' AND act_bal > 0
acct_type = '2' AND act_bal > 100
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
Click Here to Expand Forum to Full Width