Forum Stats

  • 3,874,905 Users
  • 2,266,789 Discussions
  • 7,912,003 Comments

Discussions

Define "hidden columns" in the docs

As far as I can tell, the Oracle docs don't define "hidden columns" as well as they could.

In a related post, @mathguy said it well:

Difference between hidden and invisible columns?


The documentation refers to "hidden" columns in many places, but it does not appear to define the concept.


For example, the documentation for CREATE TABLE says that invisible columns are user-specified hidden columns; and it mentions "hidden columns" eight times (including this reference related to invisible columns) but never defines "hidden".


I assume (speculate) that hidden columns existed before version 12 which introduced invisible columns. Before invisible columns, hidden columns were system-generated, and we didn't have to worry about them (we couldn't manipulate them ourselves), so Oracle didn't need to worry about defining the concept. That should have changed, though, when they introduced invisible columns, and defined them as user-specified hidden columns.


There are some clear differences between system-generated hidden columns (however defined) and invisible columns, which are user-defined. For example, you can specify an invisible column as either nullable or non-nullable. You can't do this with system-generated hidden columns (again: whatever that means). You can assign (INSERT) or reassign (UPDATE) values to an invisible column - you just need to name the column explicitly in the INSERT statement; you can't assign values to a system-generated column.

Could the docs be improved so that they clearly define hidden columns, and explain what the difference is between hidden columns and invisible columns?

Thanks.

User_1871
2 votes

Active · Last Updated

Comments

  • Sven W.
    Sven W. Member Posts: 10,559 Gold Crown

    Invisible columns are hidden columns. I think the word hidden in the docs is just used to describe what invisible means. There is no difference between "hidden" and "invisible" columns although MathGuy used the term to separate between system generated and user generated. Both are invisible columns which can colloquially be described as hidden. To understand whether an invisible column is user generated or system generated I think there is a flag in some data dictionary view.

  • Mike Kutz
    Mike Kutz Member Posts: 6,254 Gold Crown

    I've always understood that "hidden" column are columns where dba_tab_cols.hidden_column='YES'.

    Those have probably existed since the introduction to Function Based Indexes (but have always been system generated). There a few other areas where a hidden column is system generated (Temporal Validity)

    @Sven W.

    I believe dba_tab_cols.user_generated is the inverse of "system generated" but only appears in the latest version(s) of Oracle DB.

    Invisible, system hidden, normal, VC, system generated - These are things I have to consider as i build code generating templates. It would be nice to have official (consolidated) documentation