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 -> Re: PL/SQL Questions.

Re: PL/SQL Questions.

From: Mikolaj Morzy <Mikolaj.Morzy_at_cs.put.poznan.pl>
Date: 30 Jul 2001 12:06:20 +0200
Message-ID: <m3g0behgtf.fsf@dcs-430x-mm.cs.put.poznan.pl>

Your UPDATE sets the value of TESTID in all tuples of the USERS table to 3 in the last run of the loop. I guess you forgot some WHERE clause.

        Mikolaj

> Can anyone tell me why the following code doesn't produce the desire
> results?
>
>
> BEGIN
> FOR x IN 1..3 LOOP
> update users set testid = x;
> DBMS_OUTPUT.PUT_LINE(x);
> END LOOP;
> END;
>
> output to sqlplus is : 1
> 2
> 3
>
> output in testid is : 3
> 3
> 3
>
>
>
> RH 6.1
> Oracle 8.1.6
>
> Tony
Received on Mon Jul 30 2001 - 05:06:20 CDT

Original text of this message

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