Product specifications

b. Write the following statement with several parameters:
CREATE or REPLACE PROCEDURE get_ownerobjects(owner_name IN
varchar2, cat_cv IN OUT catalog_data.catcurtyp) AS
BEGIN
OPEN cat_cv FOR SELECT * FROM all_objects WHERE
owner=owner_name;
END;
Note:
See your Oracle documentation for more information on how to create packages and stored procedures.
4.3.5 Teradata stored procedures
Connection Server only supports Teradata macros when the connection established uses ODBC.
Caution:
It does not support Teradata stored procedures in ODBC, because stored procedures do not return
any result sets. It also does not support macros and stored procedures in JDBC.
Teradata macros have the following syntax:
create macro <macro_name> as (select * from <table_name>;);
See the Teradata documentation for more information.
Example:
Simple macro:
create macro GUEST95 as (select * from guest where TYear='FY95';);
Macro with parameter:
create macro MGUESTIN (inyear VARCHAR(12)) as (select * from GUEST where TYear=:inyear;);
Macro with multiple result sets:
create macro MGUEST as
(
select * from guest where TYear='FY95';
select count(*) from guest;
);
4.4 Connection pools
A driver opens a connection to the database in order to access data. The following are two methods
that you can use to connect to a database:
2012-03-1531
Learning data access specifics