By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,611 Members | 1,693 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,611 IT Pros & Developers. It's quick & easy.

Short circuit boolean eval in trigger WHEN clause?

P: n/a
G'day

I have a before-update trigger a bit like
....
REFERENCING OLD AS O NEW AS N
....
WHEN (N.STATUS 0
AND EXISTS (SELECT EXTREF FROM MY.ET
WHERE EXTREF=N.REF OR EXTREF=O.REF))
Updates should mostly fail the N.STATUS>0 clause, so I don't really want
to do the EXISTS for every update.

Will this perform short circuit evaluation, i.e. if N.STATUS is zero,
will it still evaluate EXISTS(select..) ?

Or should I move the EXISTS into an IF inside the trigger action?

--Greg Nash
Sep 3 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.