The code comes out error, it caused from the "case statement" linePlease somebody help to correct this code.Thanks in advanced create table payment(paymentid number(10) constraint payment_paymentid_pk primary key,tenantno number (5) not null constraint payment_tenantno_fk references tenant(tenantno),propid number(5) not null constraint payment_propid_fk references proplookup(proptype),paydate date default sysdate not null,amount number(8,2) not null constraint payment_amount_ck check(amount>0),paidby number(1) not null constraint payment_paidby_ck check(paidby in('cash','chq','credit','bpay')case paidby when 'cash' then paidby = 1when 'chq' then paidby = 2when 'credit' then paidby = 3when 'bpay' then paidby = 4else paidby = 0end),mthof number(2) not null constraint payment_mthof_ck check(mthof between 1 and 12));
Error at Command Line:8 Column:101Error report:SQL Error: ORA-00907: missing right parenthesis00907. 00000 - "missing right parenthesis"