SQL>
SQL> CREATE OR REPLACE PROCEDURE list_tables IS
2 CURSOR cur_tables IS
3 SELECT table_name
4 FROM user_tables
5 ORDER BY table_name;
6 BEGIN
7 HTP.HTMLOPEN;
8 HTP.HEADOPEN;
9 HTP.TITLE('Display a List');
10 HTP.HEADCLOSE;
11 HTP.BODYOPEN;
12 HTP.ULISTOPEN;
13 FOR cur_tables_rec IN cur_tables LOOP
14 HTP.LISTITEM(cur_tables_rec.table_name);
15 END LOOP;
16 HTP.ULISTCLOSE;
17 HTP.BODYCLOSE;
18 HTP.HTMLCLOSE;
19 END list_tables;
20 /
Procedure created.
SQL>