| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.tools -> Re: PL/SQL Tip of the Month
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
![]() |
![]() |