Oracle 12c - Add A New Column And The Query To Sys.col$ Shows That There Is A Gap In Segcol# (Doc ID 1578103.1)

Last updated on DECEMBER 06, 2016

Applies to:

Oracle Database - Enterprise Edition - Version 12.1.0.1 and later
Information in this document applies to any platform.

Goal

Oracle 12c - add a new column and the query to sys.col$ shows that there is a gap in segcol#.

SQL> col object_name format a40
SQL> col owner format a12
SQL> col name format a30
SQL> CREATE TABLE gap_col
(  2  P1    NUMBER,
 3  P2    NUMBER,
 4  P3    NUMBER)
 5  /

Table created.

SQL> alter table gap_col add p4_add_col char(1) default 'N';
Table altered.
SQL> select col#,segcol#,name from sys.col$ where obj#=(select object_id from dba_objects where object_name='GAP_COL')
ord er by col#;
     COL#    SEGCOL# NAME
---------- ---------- ------------------------------
        0          4           SYS_NC00004$
        1          1           P1
        2          2           P2
        3          3           P3
        4          5           P4_ADD_COL

 

Solution

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