Re: PL/SQL Tip of the Month
From: Steve Jelfs <s.jelfs_at_btinternet.com>
Date: 1997/12/29
Message-ID: <34A7B86E.6A92_at_btinternet.com>#1/1
Date: 1997/12/29
Message-ID: <34A7B86E.6A92_at_btinternet.com>#1/1
[Quoted] 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 CET