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

Home -> Community -> Usenet -> c.d.o.server -> Question on PL/SQL statement.

Question on PL/SQL statement.

From: <feilip_at_gmail.com>
Date: 13 Jun 2006 19:36:01 -0700
Message-ID: <1150252561.291907.273090@p79g2000cwp.googlegroups.com>


Hi,

I inherit the following PL/SQL statement:

       EXEC SQL SELECT COUNT(*)
		INTO :rowcount
		FROM MY_LIST L1,
		     MY_LIST L2
                WHERE L1.key_no = L2.key_no
		AND L1.supply_code = L2.supply_code
		AND L1.batch_id = '1'
		AND L1.send_delete_ind = 'Y'
		AND L2.batch_id = '1'
		AND L2.send_delete_ind = 'N';

I don't understand why it needs L1 and L2. Is the above code the same as the following:

       EXEC SQL SELECT COUNT(*)
		INTO :rowcount
		FROM MY_LIST L1
                WHERE L1.send_delete_ind = 'Y'
		OR L1.send_delete_ind = 'N';

Thanks in advance!
feilip Received on Tue Jun 13 2006 - 21:36:01 CDT

Original text of this message

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