Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Question about cursors
Hallo,
I would like to get a goood example on how to do this in a pl/sql block, maybe this is too simple but I cant get it work.
I would like to do a select from table A, like this
select id from A
where id > 10
This sql statement gives me about 10 rows. I want those rows(the id) to be inserted in a table called A. I woul dlike to use variables to store al the id's that the sql gets me.
so the values to be inserted in the table should be for instance
11
12
13
14
15
16
17
18
19
20
How can I do this, using a cutsor I guess. Please give me an example.
Thanks in advance
Roland
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author:
INET: roland.skoldblom_at_ica.se
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Fri Aug 15 2003 - 06:39:28 CDT
![]() |
![]() |