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: Constrainting NUMBER

Re: Constrainting NUMBER

From: <pobox002_at_bebub.com>
Date: 25 May 2005 18:26:48 -0700
Message-ID: <1117070808.735906.249320@o13g2000cwo.googlegroups.com>

as wrote:
> Is it good to leave all numeric columns as NUMBER instead of specifying a
> precision, say, NUMBER(6,2).
>
> What are the pros and cons of the two approaches? At least, it seems that
> using NUMBER for everything simplified code modification in case we need to
> change the required precision.

I would consider this a con.

SQL> create table t (deptno number);

Table created.

SQL> insert into t values (54635243535464744654434232.77645534343);

1 row created.

SQL> select * from t;

    DEPTNO



5.4635E+25

If you are worried about code modifications then declare your variables like this

    l_deptno t.deptno%type;

-- 
MJB
Received on Wed May 25 2005 - 20:26:48 CDT

Original text of this message

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