Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-02438: Column check constraint cannot reference other columns

Sevdimali IsayevMay 8 2018 — edited May 9 2018

Hello,

In docs(https://docs.oracle.com/cd/B19306_01/server.102/b14200/clauses002.htm ) it writes:

The condition of a check constraint can refer to any column in the table, but it cannot refer to columns of other tables.

But when I try to execute this create table script, I got an error.

create table il_ck_emp5 (

emp_id number,

salary number check (salary/emp_id>20)

)

My Oracle version is: Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

Can anyone explain it for me

Please note that it is case studying for an exam.

Thanks before hand.

This post has been answered by Paulzip on May 8 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 5 2018
Added on May 8 2018
2 comments
3,270 views