0
votes
alter table jdetails add constraint check_fee check (fee in('PAID','PENDING');

alter table jdetails add constraint check_fee check (fee in('PAID','PENDING')

ERROR at line 1:

ORA-00907: missing right parenthesis

what is the mistake in my add constraint..? please tell me...any one

2
should be: alter table jdetails add constraint check_fee check (fee in('PAID','PENDING')) - Eray Balkanli
Count the ('s and )'s. Same number? - jarlh

2 Answers

2
votes

just add one more parenthesis ) to your statement in check. your check function is not closed

-1
votes

Always check that your parenthesis are closed, no matter what language. You were missing a parenthesis at the end that matched with the "check" function. The easiest way to quickly check is to either count the number of "left-parenthesis (" and see if they match the number of "right-parenthesis )". Also, depending on your IDE, when highlighting/clicking on a parenthesis, it may highlight its currently matching parenthesis.

alter table jdetails add constraint check_fee check (fee in('PAID','PENDING'));

Edit: Someone care to tell me why this was downvoted? Lol