create or replace PROCEDURE sp_preDefinedTemplate AS/IS
BEGIN
DBMS_OUTPUT.PUT_LINE('Hello My First Stored Procedure');
END sp_preDefinedTemplate;
Out put of the stored procedure as follows.
Hello My First Stored Procedure
//Opening Cursor
create or replace PROCEDURE sp_preDefinedTemplate IS
/* Open Cursor and have all templates */
CURSOR my_cursor is select * from savedquerytemplate;
row_val my_cursor%ROWTYPE;
BEGIN
/* Loop on my_cursor and print the template names */
DBMS_OUTPUT.PUT_LINE('Name of the template');
OPEN my_cursor;
LOOP
fetch my_cursor into row_val;
EXIT WHEN my_cursor%NOTFOUND;
DBMS_OUTPUT.PUT_LINE(row_val.queryname);
end LOOP;
commit;
END sp_preDefinedTemplate;
//Out Put is
All AuditLog Data
Evconfigdata_FTTN_<EntriView TID>_Full_
All PM Data
//