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!

Check constraint on range of number

960796May 8 2019 — edited May 12 2019

Hi,

Database : Oracle 12.2

Database has a PLN_N_RNG table with structure as follows. Table is used to pre-define a set of range for plan number for the given product. In the example below, row#2 should not be allowed because it falls within the range of the first row.  Is there an option to put a table level constraint  to restrict this? Or  should I check my next option which will be Triggers?

PLN_RNG_ID (PK-Generated sequence)
PRODUCT_ID
PLN_FROM_RNGE
PLN_TO_RNG
1100110
210029

Thanks,

Sunny

Comments
Post Details
Added on May 8 2019
23 comments
1,846 views