Unix Technical Forum

Prompting multiples times in PL/SQL??

This is a discussion on Prompting multiples times in PL/SQL?? within the Oracle Database forums, part of the Database Server Software category; --> The Table format is as follows: SQL> desc MyTEST; Name Null? Type ----------------------------------------- -------- ---------------------------- NAME VARCHAR2(10 CHAR) I ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-25-2008, 05:10 AM
qazmlp1209@rediffmail.com
 
Posts: n/a
Default Prompting multiples times in PL/SQL??

The Table format is as follows:

SQL> desc MyTEST;
Name Null? Type
----------------------------------------- --------
----------------------------
NAME VARCHAR2(10 CHAR)

I want to add 10 rows into this Table, with each row containing the
'name' that I want to enter.
The following PL/SQL script does not work:

----------
declare
i number;
begin
for i in 1..10 loop
insert into tst (name) values ('&name');
end loop;
end;
----------

It prompts for the 'name' only once and the same name figures in all
the rows. But, I want to be prompted 10 times and each time I want to
enter different 'name'. How exactly I should adapt the PL/SQL script
for this?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:28 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com