| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Number or Character for Year
I would agree with this person to use numbers. That way, any operations
you do (mathematical, that is), you don't have to use to_number. Saves
some typing.
--
Matt Brennan
SQL*Tools Specialist
GERS Retail Systems
9725-C Scranton Road
San Diego, California 92121
1-800-854-2263
mbrennan_at_gers.com
(Original email address is spam-blocked.)
Yun-Ho Sikora <yun-ho.sikora_at_boeing.com> wrote in article
<357D4323.1639FAD_at_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 - 16:15:18 CDT
![]() |
![]() |