Thanks for the question.
Asked: December 08, 2016 - 5:41 am UTC
Last updated: April 19, 2021 - 5:36 am UTC
Viewed 10K+ times! This question is
2 cursor c is
3 select sq_test_1.NEXTVAL seq, table_name, subpartition_name
4 FROM user_tab_subpartitions;
5 type clist is table of c%rowtype;
6 l_rows clist;
9 open c; fetch c bulk collect into l_rows; close c;
11 for i in 1 .. l_rows.count
13 INSERT INTO table_1(a,b,c)
14 values ( l_rows(i).seq, l_rows(i).table_name, l_rows(i).subpartition_name );
15 end loop;
PL/SQL procedure successfully completed.
Abhijit, April 18, 2021 - 8:05 am UTC
Connor and Chris don't just spend all day on AskTOM. You can also catch regular content via Connor's blog and Chris's blog. Or if video is more your thing, check out Connor's latest video and Chris's latest video from their Youtube channels. And of course, keep up to date with AskTOM via the official twitter account.
Share and learn SQL and PL/SQL; free access to the latest version of Oracle Database!
Classes, workouts and quizzes on Oracle Database technologies. Expertise through exercise!