Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Constrainting NUMBER
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
If you are worried about code modifications then declare your variables like this
l_deptno t.deptno%type;
-- MJBReceived on Wed May 25 2005 - 20:26:48 CDT