Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Best Practices for use of DML in PL/SQL

Best Practices for use of DML in PL/SQL

From: Rob Cole <rcole_at_cellnet.co.uk>
Date: 1997/03/13
Message-ID: <3327DC57.A0D@cellnet.co.uk>#1/1

I am one at one of those points where there is more than one way to perform a task and due to inexperience I am not quite sure which option is best.

I have a PL/SQL procedure that performs an UPDATE DML operation. I can perform the update in one of 2 ways depending on a flag value that is passed to the procedure.

Do I :

  1. Use one UPDATE statement with an OR in the WHERE clause
  2. Use 2 UPDATES and decide which one to use based on the flag value?

I'm going to use option b) because it makes the code clearer and I remember something about ORs not performing too well.

What do you think? Received on Thu Mar 13 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US