作者:行侠客人生_983 | 来源:互联网 | 2023-05-18 06:40
Isthereawaytouseiflogicinanoraclesqlcheckconstraints?有没有办法在oraclesql中使用if逻辑检查约束?Thi
Is there a way to use if logic in an oracle sql check constraints?
有没有办法在oracle sql中使用if逻辑检查约束?
This is my pseudo table:
这是我的伪表:
create table child
(
name,
behaviour,
treat,
);
Now what i want is that if the behaviour
of child = 'bad'
then treat != 'lollies'
.
现在我想要的是,如果孩子的行为='坏',那么治疗!='lollies'。
3 个解决方案