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.
Best practice is to enforce data integrity in everything you do. That means define your data types after careful consideration and study of the data they will be asked to hold.
The alternative is to do the following:
CREATE TABLE bad_practice (
person_id NUMBER,
first_name VARCHAR2(4000), last_name VARCHAR2(4000), address VARCHAR2(4000), socsecno VARCHAR2(4000));
does that make any sense? A Social Security Number of up to 4000 bytes?
-- Daniel A. Morgan Relational theory is not something that is simply a nice-to-have. http://www.psoug.org damorgan_at_x.washington.edu (replace x with u to respond)Received on Thu May 26 2005 - 00:36:17 CDT
![]() |
![]() |