Skip to Main Content

Oracle Database Free

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Remark on an “anomaly” in the eror messages for DOMAINS.

PDVBVDec 20 2024 — edited Dec 20 2024

When using Domain-Enum, there are two different error messages when you try to insert an invalid-item. Re-producing script available.

The first, somewhat confusing error, is when i used the Domain-definition as a Constant to insert the values:

ORA-00984: column not allowed here.

The more clear message is :

ORA-11534: check constraint (SCOTT.SYS_C009881) involving column COLOR due to domain constraint SCOTT.SYS_DOMAIN_C00352 of domain

I far more prefer the 2nd error. Although I can see why the first one would appear.

Any idea to change the error in first case ?

Script: demo_enum_6anomaly.sql

or https://drive.google.com/file/d/11bk1nGPd0hJyod-sQVO-fZamYNV6omQE/view?usp=sharing

note: the error-text is shorter, more concise in SQL*Plus. SQLcl adds a lot of helpful stuff, but this almost obscures the errors.

Screenshot:

Comments
Post Details
Added on Dec 20 2024
0 comments
46 views