The differences between sys.col$ and sys.coltype$ The differences between sys.col$ and sys.coltype$ oracle oracle

The differences between sys.col$ and sys.coltype$


COL$ is the data dictionary table for all columns. That is all the visible columns on the table plus the invisible columns. So the first query returns three rows for ID, COL1 and SYS_NC00003$. which is the offline storage for the XMLTYPE column (that's why COL# is the same and INTCOL# is different).

COLTYPE$ is the data dictionary table for columns declared as a complex data type. So COL$.TYPE# for COl1 is 58 ; this maps to a data type of ANYDATE or XMLTYPE, which are complex data types. The other two columns have data types of NUMBER ( COL$.TYPE# = 2) and CLOB ( COL$.TYPE# = 112) which are both Oracle "primitives". So that's why there's only one record in the query of COLTYPE$