Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: PL/SQL Tip of the Month

Re: PL/SQL Tip of the Month

From: Steve Jelfs <s.jelfs_at_btinternet.com>
Date: 1997/12/29
Message-ID: <34A7B86E.6A92@btinternet.com>#1/1

Cam White wrote:
>
 

>
> CREATE OR REPLACE PACKAGE app_types
> IS
> SUBTYPE primary_key IS order.order_id%TYPE;
> END;
> /
>
> Then whenever you need to declare a variable of type "primary key", you do
> it like this:
>
> DECLARE
> my_id app_types.primary_key;
> BEGIN
> ...
>
> Notice that you do not need to use the %TYPE attribute on the declaration.

And how does this differ from

DECLARE
   my_id order.order_id%TYPE;
BEGIN
   ....
END; ?

Sj Received on Mon Dec 29 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US