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

Home -> Community -> Usenet -> c.d.o.misc -> Re: new data type or alias for NUMERIC(18)?

Re: new data type or alias for NUMERIC(18)?

From: DA Morgan <damorgan_at_psoug.org>
Date: Fri, 18 Nov 2005 11:06:53 -0800
Message-ID: <1132340810.861140@yasure>


Mark Harrison wrote:
> I've got an application which deals with a bunch of
> asset identifiers, which should all be NUMERIC(18).
>
> Can I create a new data type or alias so that my
> table definitions, etc, show a type of ASSETID rather
> than NUMERIC(18)?
>
> Thanks!
> Mark

Assuming you are actually working in Oracle you can. NUMERIC(18) is not Oracle syntax.

A user defined data type is as simple as:

CREATE OR REPLACE TYPE ssn_t AS OBJECT ( ssn_type CHAR(11));
/

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Fri Nov 18 2005 - 13:06:53 CST

Original text of this message

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