Friday, January 16, 2009

PL/SQL Tips - 1

1. Create procedure, function
procedure (...) is begin end;
function (...) return ... is ... begin end;
in, out, in out parameters.
2. Create package
package header (interface): create or replace package pkg as ... end;
package body (implementation): create or replace package body pkg as ... end;
3. Check objects created by user
select object_type, object_name, status from user_objects where object_type in ('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') order by object_type;
It's stored in the table called "user_objects".
4. Check implementations
select text from user_source where name= 'F_GETAREA_NR' order by line;
It's stored in the table called "user_source".