Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Number or Character for Year
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