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

Home -> Community -> Usenet -> c.d.o.server -> Re: Number or Character for Year

Re: Number or Character for Year

From: Yun-Ho Sikora <yun-ho.sikora_at_boeing.com>
Date: Tue, 9 Jun 1998 14:13:56 GMT
Message-ID: <357D4323.1639FAD@boeing.com>


I believe the rule of thumb is that you should store numbers as NUMBER(4) if you plan to do any computations on the values in the field, otherwise use VARCHAR(4). Since you asked specifically about a "year", I would put that in a NUMBER datatype or preferably a DATE datatype, depending on what you need it for.

nboemio_at_my-dejanews.com wrote:

> When storing a year in a table, is there any preference between using
> NUMBER(4) or VARCHAR2(4)?
>
> And I mean as a general convention throughout the database and not for a
> specific table.
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
Received on Tue Jun 09 1998 - 09:13:56 CDT

Original text of this message

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