Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL question: How to prevent mutually exclusive values?
Actually, depending on your jurisdiction, can hands/feet etc be classified as weapons (professional boxers, etc?)
A before insert or update trigger is the only answer. Something like:
trigger header
ammo number;
begin
ammo := 0;
if :new.weapon_type='NONE' then
select count(*) into ammo from arrest_table where arrest_id=:old.arrest_id and weapon_type <> 'NONE'.
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Sat Dec 05 1998 - 00:00:00 CST
![]() |
![]() |