Retrieving Information on a Procedure
-----------------------------------------------
This select returns stores information about a database’s stored procedures
-----------------------------------------------
select distinct RDB$PROCEDURE_NAME
from RDB$PROCEDURES
-----------------------------------------------
This select returns the source for a procedure
-----------------------------------------------
select rdb$procedure_source
from rdb$procedures
where rdb$procedure_name = 'ADD_EMP_PROJ';
-------------------------------------------------------------------------
This select returns the parametersc name, datatype, datatype length, and
weather it is an input or output parameter
-------------------------------------------------------------------------
select p.rdb$parameter_name,
p.rdb$parameter_type,
t.rdb$type_name,
f.rdb$field_length
from rdb$procedure_parameters p, rdb$fields f, rdb$types t
where p.rdb$field_source=f.rdb$field_name and
p.rdb$procedure_name='ADD_EMP_PROJ' and
f.rdb$field_type=t.rdb$type and
t.rdb$field_name='RDB$FIELD_TYPE';