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 against another table

686466Feb 20 2009 — edited Feb 20 2009
new student here, trying to learn oracle. I am trying to create a check constraint where an insured value column will verify that it is >= to a price column in another table. The code I have used is:

alter table "SHIPMENTITEM" add
constraint CHK_INSURANCE
check (insuredvalue >= purchase(priceUSD));

The error i keep getting is ORA-00904: "PRICEUSD": invalid identifier, I have checked and the column names and data types are the same, any help would be appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 20 2009
Added on Feb 20 2009
4 comments
3,435 views