Search code examples
oracle-databasesqlplussql-inserttruncation

Oracle truncating column


I have the following query.

insert into ORDER_INFO(ORDINF_PK,ORDINF_LGNDET_PK_FK,MEDIA_TYPE,ORDINF_MUSIC_FK,DAT)
values (1,1,'Music',21,TO_DATE('14-OCT-2015','DD-MON-YYYY'));

insert into ORDER_INFO(ORDINF_PK,ORDINF_LGNDET_PK_FK,MEDIA_TYPE,ORDINF_MUSIC_FK,ORDINF_SERIES_FK,DAT)
values (2,2,'Series',71,23,TO_DATE('07-NOV-2015','DD-MON-YYYY'));

however when I do:

select * from ORDER_INFO;

I get:

truncating (as requested) before column ORDINF_SERIES_FK

truncating (as requested) before column ORDINF_MOVIES_FK

 ORDINF_PK ORDINF_LGNDET_PK_FK           MEDIA_TYPE ORDINF_MUSIC_FK      DAT
---------- ------------------- -------------------- --------------- ---------
     1                       1                Music              21 14-NOV-14
     2                       2               Series              71 07-NOV-15

I understand that it is truncating ORDINF_MOVIES_FK because there is no entry in that column, but why is it truncating the column ORDINF_SERIES_FK?


Solution

  • I managed to solve the issue, I did this.

    set wrap on;
    set pagesize 50000;
    set linesize 120;
    

    link here: http://www.anattatechnologies.com/q/2012/01/sqlplus-pagesize-and-linesize/