SQL>
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.PRINT('<HTML>');
8 HTP.PRINT('<HEAD>');
9 HTP.PRINT('<TITLE>Display a List Tables</TITLE>');
11 HTP.PRINT('</HEAD>');
12 HTP.PRINT('<BODY>');
13 HTP.PRINT('<UL>');
14 FOR cur_tables_rec IN cur_tables LOOP
15 HTP.PRINT('<LI>' || cur_tables_rec.table_name);
16 END LOOP;
17 HTP.PRINT('</UL>');
18 HTP.PRINT('</BODY>');
19 HTP.PRINT('</HTML>');
20 END list_tables;
21 /
Procedure created.
SQL>
|