PL/SQL question/anomaly???

From: Mahesh Vallampati <m0v5533_at_tamsun.tamu.edu>
Date: 22 Jul 1994 16:51:01 -0500
Message-ID: <30pf05$kjm_at_tamsun.tamu.edu>


Hie
Here is a small PL/SQL script which loops five times and accepts a value of j.In a traditional programming language,I would be prompted for the value of j five times.But when i ran this PL/SQL script,it prompted me for the value of j once and inserted the same value five times and exited. Is it a "feature" of PL/SQL or am i missing something? If it matters i am using PL/SQL version 2.0.If there is sufficient interest i will summarize.



declare
i number(1);
j number(1);
begin
for i in 1..5
loop
insert into temp values(&j);
end loop;
end;
/

Thanks and Regards
Mahesh Vallampati
M.S. In EE
Dept.of Electrical Engineering,
Texas A & M University.
Ph:(409)845-6189
\\ In the Beginning there was Codd..... Received on Fri Jul 22 1994 - 23:51:01 CEST

Original text of this message