How do you make if constraints in Oracle SQL?
Create Table A(
b varchar(25) primary key,
c varchar(25),
constraint b_1
check(b='name' and c != 'notallowed')
);
The following should not work:
Insert into A values('name','notallowed');
But this should work:
Insert into A values('notname','notallowed');
How can I fix my constraint?
I guess you are looking for this