Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle convert automatically datatype from INTEGER to Number(38,0)

633691Jul 15 2011 — edited Jul 15 2011
Hi
i have below create table script, this contains INTEGER datatype for ID as well as some other columns.


create table Sample_MK (
CREATED DATE default SYSDATE not null,
UPDATED DATE default SYSDATE not null,
ID INTEGER not null,
VERSION SMALLINT not null,
FROZEN SMALLINT default 0 not null
constraint CKC_SAMPLE_MK check (FROZEN between 0 and 1),
STATUS SMALLINT not null,
OWNER INTEGER not null,
CREATED_BY INTEGER not null,
UPDATED_BY INTEGER not null,
RISK INTEGER default 0 not null,
TRANSITION_STATUS NUMBER(38,0),
LIFECYCLE_DEF_ID NUMBER(38,0),
constraint PK_SAMPLE_MK primary key (ID)
);

But when i create this table and desc it shows like below:-
Table created

SQL> desc sample_mk
Name Type Nullable Default Comments

CREATED DATE SYSDATE
UPDATED DATE SYSDATE
ID NUMBER(38)
VERSION NUMBER(38)
FROZEN NUMBER(38) 0
STATUS NUMBER(38)
OWNER NUMBER(38)
CREATED_BY NUMBER(38)
UPDATED_BY NUMBER(38)
RISK NUMBER(38) 0
TRANSITION_STATUS NUMBER(38) Y
LIFECYCLE_DEF_ID NUMBER(38) Y

Why Oracle is converting my datatype from integer to number?
We were migrated from 10g. Currently using Oracle 11gR1.
We all previous entities have element_id of integer type but now newly created entity's are having number datatype because of this auto conversion.
Because of this i have started getting errors in my Queries.
Please let me know if any other information required.
Thanks in Advance..

Edited by: Ora_Is_Not_Magic on Jul 15, 2011 1:08 PM

Edited by: Ora_Is_Not_Magic on Jul 15, 2011 1:29 PM

Edited by: Ora_Is_Not_Magic on Jul 15, 2011 1:31 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 12 2011
Added on Jul 15 2011
17 comments
3,538 views