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!

Assertions to Trigger

934737May 27 2012 — edited May 27 2012
Hello,

I'm trying to do an assertion in which a customer must be sent one or more messages in my database. However, in Oracle, I've noticed you can't do assertions but you can have the similar outcome with the use of triggers.

Currently I have:
CREATE ASSERTION each_cust_get_msg
CHECK (NOT EXISTS (
SELECT * FROM Customer Cust
WHERE NOT EXISTS (
SELECT * FROM SendMsg Send
WHERE Cust.email = Send.email)))
Can anybody please help me turn the above assertion to work in Oracle? It doesn't necessarily have to be a trigger.

Any help is appreciated.

Thanks.

Edited by: user13150012 on May 27, 2012 6:48 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 24 2012
Added on May 27 2012
1 comment
205 views