Database Administration (MOSC)

MOSC Banner

why get I no error when I change a column from integer to number(38,0) even if there are data wich a

edited Mar 21, 2014 12:00PM in Database Administration (MOSC) 10 commentsAnswered

Oracle 11.2.0.4 PSU1 on AIX 6.1

I wanted to change a column created as integer to number(38,0) and the change finished successfull without error. After the change I checked the data of the column, if there exists column contains which are longer then 38 digits. And indeed, there are data with more then 38 digits!!

Why I didn't get "SQL Error: ORA-01440: column to be modified must be empty to decrease precision or scale" or any other error message when I did the change?

Here a testcase :

>>>>>>>>>>>>

create table tint (fint integer);

create unique index x0int on tint(fint);

INSERT INTO TINT VALUES (123456789012345678901234567890123456789);

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

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

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center