IN 11G, PRECISION RETURNED AS 0 FOR COLUMN ALTERED TO DEFAULT AND NOT NULL (Doc ID 1061007.1)

Last updated on JULY 05, 2017

Applies to:

Oracle Server - Enterprise Edition - Version: 11.1.0.6 and later   [Release: 11.1 and later ]
Oracle Server - Enterprise Edition - Version: 11.1.0.6 and later    [Release: 11.1 and later]
Information in this document applies to any platform.

Symptoms

If the table is defined like the following,

create table test(val number(10));

Now, if you alter the column in three different ways:
1. alter table test add (val number(10) default 1);
2. alter table test add (val number(10) not null);
3. alter table test add (val number(10) default 1 not null);

Both scenario 1 AND scenario 2 return the correct precision for the number fields using .
However, using the scenario 3 gives PRECISION = 0.This is incorrect.

These scenario works fine with 10g.
Issue occurs using database version 11g onwards.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms