Details

    Description

      This feature adds invisible column functionality to server.
      There is 4 level of "invisibility":

      1. Not invisible (NOT_INVISIBLE) — Normal columns created by the user

      2. A little bit invisible (USER_DEFINED_INVISIBLE) — columns that the
      user has marked invisible. They aren't shown in SELECT * and they
      don't require values in INSERT table VALUE (...). Otherwise
      they behave as normal columns.

      3. More invisible (SYSTEM_INVISIBLE) — Can be queried explicitly,
      otherwise invisible from everything. Think ROWID sytem column.
      Because they're invisible from ALTER TABLE and from CREATE TABLE
      they cannot be created or dropped, they're created by the system.
      User cant not create a column name which is same as of
      SYSTEM_INVISIBLE.

      4. Very invisible (COMPLETELY_INVISIBLE) — as above, but cannot be
      queried either. They can only show up in EXPLAIN EXTENDED (might
      be possible for a very invisible indexed virtual column) but
      otherwise they don't exist for the user.If user creates a columns
      which has same name as of COMPLETELY_INVISIBLE then
      COMPLETELY_INVISIBLE column is renamed again. So it is completely
      invisible from user.

      Invisible Index(HA_INVISIBLE_KEY):-
      Creation of invisible columns require a new type of index which
      will be only visible to system. User cant see/alter/create/delete
      this index. If user creates a index which is same name as of
      invisible index then it will be renamed.

      Syntax Details:-

      Only USER_DEFINED_INVISIBLE column can be created by user. This
      can be created by adding INVISIBLE suffix after column definition.

      Create table t1( a int invisible, b int);

      Rules:-
      There are some rules/restrictions related to use of invisible columns
      1. All the columns in table cant be invisible.
      Create table t1(a int invisible);
      error
      Create table t1(a int invisible, b int invisble);
      error
      2. If you want invisible column to be NOT NULL then you have to supply
      Default value for the column.
      Create table t1(a int, b int not null);
      error
      3. If you create a view/create table with select * then this wont copy
      invisible fields. So newly created view/table wont have any invisible
      columns.
      Create table t2 as select * from t1;//t2 wont have t1 invisible column
      Create view v1 as select * from t1;//v1 wont have t1 invisible column
      4. Invisibility wont be forwarded to next table in any case of create
      table/view as select */(a,b,c) from table.
      Create table t2 as select a,b,c from t1; // t2 will have t1 invisible
      // column(b), but this wont be invisible in t2
      Create view v1 as select a,b,c from t1; // v1 will have t1 invisible
      // column(b), but this wont be invisible in v1

      See also Invisible Columns in Oracle and Hidden Columns in DB2.

      Q: What happens in one declares a hidden column that is NOT NULL and has no default value? Oracle returns an error at INSERT time if the column value was not provided. DB2 does not allow to create such a column.
      A: We'll do the latter, an error at CREATE TABLE time.
      Q: The syntax. Oracle uses the INVISIBLE keyword, DB2 uses IMPLICITLY HIDDEN.
      A: We'll use INVISIBLE.
      Q: Visibility of hidden columns in SHOW commands, in the INFORMATION_SCHEMA tables, in ALTER, etc. Oracle hides invisible columns in the informational commands too (and has a special view that shows them). DB2 hides them too, unless one uses a special form of the DESCRIBE} statement.
      A: Fully visible everywhere. They're only hidden from SELECT * and INSERT that does not specify the column list.
      Q: Replication. Are hidden columns written to binlog?
      A: User-hidden columns — absolutely. But others? ROWID pseudo-column should not be replicated, that's what "pseudo" mean. Hidden automatic primary key should be. On the other hand, ROWID is engine-dependent, engine knows what to do with it. So we can replicate all hidden columns just normally. The engine will just not write down ROWID, if it feels like it.
      Q: Indexes on hidden columns, are they hidden? What about indexes on a mix of hidden/visible columns?
      A: On user-visible columns, no and no. On more hidden — yes and impossible.

      Attachments

        Issue Links

          Activity

            serg Sergei Golubchik created issue -
            serg Sergei Golubchik made changes -
            Field Original Value New Value
            serg Sergei Golubchik made changes -
            Description The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.
            The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1]
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            Description The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1]
            The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            Detail:
            serg Sergei Golubchik made changes -
            Description The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            Detail:
            The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            *Q:* What happens in one declares a hidden column that is {{NOT NULL}} and has no default value? Oracle returns an error at {{INSERT}} time if the column value was not provided. DB2 does not allow to create such a column.
            *A:* We'll do the latter, an error at {{CREATE TABLE}} time.
            *Q:* The syntax. Oracle uses the {{INVISIBLE}} keyword, DB2 uses {{IMPLICITLY HIDDEN}}.
            *A:* ???
            serg Sergei Golubchik made changes -
            Description The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            *Q:* What happens in one declares a hidden column that is {{NOT NULL}} and has no default value? Oracle returns an error at {{INSERT}} time if the column value was not provided. DB2 does not allow to create such a column.
            *A:* We'll do the latter, an error at {{CREATE TABLE}} time.
            *Q:* The syntax. Oracle uses the {{INVISIBLE}} keyword, DB2 uses {{IMPLICITLY HIDDEN}}.
            *A:* ???
            The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            *Q:* What happens in one declares a hidden column that is {{NOT NULL}} and has no default value? Oracle returns an error at {{INSERT}} time if the column value was not provided. DB2 does not allow to create such a column.
            *A:* We'll do the latter, an error at {{CREATE TABLE}} time.
            *Q:* The syntax. Oracle uses the {{INVISIBLE}} keyword, DB2 uses {{IMPLICITLY HIDDEN}}.
            *A:* we use {{HIDDEN}} ???
            serg Sergei Golubchik made changes -
            Description The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            *Q:* What happens in one declares a hidden column that is {{NOT NULL}} and has no default value? Oracle returns an error at {{INSERT}} time if the column value was not provided. DB2 does not allow to create such a column.
            *A:* We'll do the latter, an error at {{CREATE TABLE}} time.
            *Q:* The syntax. Oracle uses the {{INVISIBLE}} keyword, DB2 uses {{IMPLICITLY HIDDEN}}.
            *A:* we use {{HIDDEN}} ???
            The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            *Q:* What happens in one declares a hidden column that is {{NOT NULL}} and has no default value? Oracle returns an error at {{INSERT}} time if the column value was not provided. DB2 does not allow to create such a column.
            *A:* We'll do the latter, an error at {{CREATE TABLE}} time.
            *Q:* The syntax. Oracle uses the {{INVISIBLE}} keyword, DB2 uses {{IMPLICITLY HIDDEN}}.
            *A:* We use {{HIDDEN}} ???
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            Description The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            *Q:* What happens in one declares a hidden column that is {{NOT NULL}} and has no default value? Oracle returns an error at {{INSERT}} time if the column value was not provided. DB2 does not allow to create such a column.
            *A:* We'll do the latter, an error at {{CREATE TABLE}} time.
            *Q:* The syntax. Oracle uses the {{INVISIBLE}} keyword, DB2 uses {{IMPLICITLY HIDDEN}}.
            *A:* We use {{HIDDEN}} ???
            The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            *Q:* What happens in one declares a hidden column that is {{NOT NULL}} and has no default value? Oracle returns an error at {{INSERT}} time if the column value was not provided. DB2 does not allow to create such a column.
            *A:* We'll do the latter, an error at {{CREATE TABLE}} time.
            *Q:* The syntax. Oracle uses the {{INVISIBLE}} keyword, DB2 uses {{IMPLICITLY HIDDEN}}.
            *A:* We use {{HIDDEN}}
            *Q:* Visibility of hidden columns in {{SHOW}} commands, in the {{INFORMATION_SCHEMA}} tables, in {{ALTER}}, etc.
            *A:* Fully visible everywhere. They're only hidden from {{SELECT *}} and {{INSERT}} that does not specify the column list.
            serg Sergei Golubchik made changes -
            Description The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            *Q:* What happens in one declares a hidden column that is {{NOT NULL}} and has no default value? Oracle returns an error at {{INSERT}} time if the column value was not provided. DB2 does not allow to create such a column.
            *A:* We'll do the latter, an error at {{CREATE TABLE}} time.
            *Q:* The syntax. Oracle uses the {{INVISIBLE}} keyword, DB2 uses {{IMPLICITLY HIDDEN}}.
            *A:* We use {{HIDDEN}}
            *Q:* Visibility of hidden columns in {{SHOW}} commands, in the {{INFORMATION_SCHEMA}} tables, in {{ALTER}}, etc.
            *A:* Fully visible everywhere. They're only hidden from {{SELECT *}} and {{INSERT}} that does not specify the column list.
            The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            *Q:* What happens in one declares a hidden column that is {{NOT NULL}} and has no default value? Oracle returns an error at {{INSERT}} time if the column value was not provided. DB2 does not allow to create such a column.
            *A:* We'll do the latter, an error at {{CREATE TABLE}} time.
            *Q:* The syntax. Oracle uses the {{INVISIBLE}} keyword, DB2 uses {{IMPLICITLY HIDDEN}}.
            *A:* We use {{HIDDEN}}
            *Q:* Visibility of hidden columns in {{SHOW}} commands, in the {{INFORMATION_SCHEMA}} tables, in {{ALTER}}, etc. Oracle hides invisible columns in the informational commands too (and has a special view that shows them).
            *A:* Fully visible everywhere. They're only hidden from {{SELECT *}} and {{INSERT}} that does not specify the column list.
            serg Sergei Golubchik made changes -
            Description The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            *Q:* What happens in one declares a hidden column that is {{NOT NULL}} and has no default value? Oracle returns an error at {{INSERT}} time if the column value was not provided. DB2 does not allow to create such a column.
            *A:* We'll do the latter, an error at {{CREATE TABLE}} time.
            *Q:* The syntax. Oracle uses the {{INVISIBLE}} keyword, DB2 uses {{IMPLICITLY HIDDEN}}.
            *A:* We use {{HIDDEN}}
            *Q:* Visibility of hidden columns in {{SHOW}} commands, in the {{INFORMATION_SCHEMA}} tables, in {{ALTER}}, etc. Oracle hides invisible columns in the informational commands too (and has a special view that shows them).
            *A:* Fully visible everywhere. They're only hidden from {{SELECT *}} and {{INSERT}} that does not specify the column list.
            The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            *Q:* What happens in one declares a hidden column that is {{NOT NULL}} and has no default value? Oracle returns an error at {{INSERT}} time if the column value was not provided. DB2 does not allow to create such a column.
            *A:* We'll do the latter, an error at {{CREATE TABLE}} time.
            *Q:* The syntax. Oracle uses the {{INVISIBLE}} keyword, DB2 uses {{IMPLICITLY HIDDEN}}.
            *A:* We use {{HIDDEN}}
            *Q:* Visibility of hidden columns in {{SHOW}} commands, in the {{INFORMATION_SCHEMA}} tables, in {{ALTER}}, etc. Oracle hides invisible columns in the informational commands too (and has a special view that shows them). DB2 hides them too, unless one uses a special form of the {{DESCRIBE}}} statement.
            *A:* Fully visible everywhere. They're only hidden from {{SELECT *}} and {{INSERT}} that does not specify the column list.
            serg Sergei Golubchik made changes -
            Labels Compatibility
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            Description The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            *Q:* What happens in one declares a hidden column that is {{NOT NULL}} and has no default value? Oracle returns an error at {{INSERT}} time if the column value was not provided. DB2 does not allow to create such a column.
            *A:* We'll do the latter, an error at {{CREATE TABLE}} time.
            *Q:* The syntax. Oracle uses the {{INVISIBLE}} keyword, DB2 uses {{IMPLICITLY HIDDEN}}.
            *A:* We use {{HIDDEN}}
            *Q:* Visibility of hidden columns in {{SHOW}} commands, in the {{INFORMATION_SCHEMA}} tables, in {{ALTER}}, etc. Oracle hides invisible columns in the informational commands too (and has a special view that shows them). DB2 hides them too, unless one uses a special form of the {{DESCRIBE}}} statement.
            *A:* Fully visible everywhere. They're only hidden from {{SELECT *}} and {{INSERT}} that does not specify the column list.
            The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            *Q:* What happens in one declares a hidden column that is {{NOT NULL}} and has no default value? Oracle returns an error at {{INSERT}} time if the column value was not provided. DB2 does not allow to create such a column.
            *A:* We'll do the latter, an error at {{CREATE TABLE}} time.
            *Q:* The syntax. Oracle uses the {{INVISIBLE}} keyword, DB2 uses {{IMPLICITLY HIDDEN}}.
            *A:* We use {{HIDDEN}} ???
            *Q:* Visibility of hidden columns in {{SHOW}} commands, in the {{INFORMATION_SCHEMA}} tables, in {{ALTER}}, etc. Oracle hides invisible columns in the informational commands too (and has a special view that shows them). DB2 hides them too, unless one uses a special form of the {{DESCRIBE}}} statement.
            *A:* Fully visible everywhere. They're only hidden from {{SELECT *}} and {{INSERT}} that does not specify the column list.
            alvinr Alvin Richards (Inactive) made changes -
            Labels Compatibility Compatibility NRE-307517
            alvinr Alvin Richards (Inactive) made changes -
            Labels Compatibility NRE-307517 Compatibility
            serg Sergei Golubchik made changes -
            Status Open [ 1 ] In Review [ 10002 ]
            serg Sergei Golubchik made changes -
            Description The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            *Q:* What happens in one declares a hidden column that is {{NOT NULL}} and has no default value? Oracle returns an error at {{INSERT}} time if the column value was not provided. DB2 does not allow to create such a column.
            *A:* We'll do the latter, an error at {{CREATE TABLE}} time.
            *Q:* The syntax. Oracle uses the {{INVISIBLE}} keyword, DB2 uses {{IMPLICITLY HIDDEN}}.
            *A:* We use {{HIDDEN}} ???
            *Q:* Visibility of hidden columns in {{SHOW}} commands, in the {{INFORMATION_SCHEMA}} tables, in {{ALTER}}, etc. Oracle hides invisible columns in the informational commands too (and has a special view that shows them). DB2 hides them too, unless one uses a special form of the {{DESCRIBE}}} statement.
            *A:* Fully visible everywhere. They're only hidden from {{SELECT *}} and {{INSERT}} that does not specify the column list.
            The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            *Q:* What happens in one declares a hidden column that is {{NOT NULL}} and has no default value? Oracle returns an error at {{INSERT}} time if the column value was not provided. DB2 does not allow to create such a column.
            *A:* We'll do the latter, an error at {{CREATE TABLE}} time.
            *Q:* The syntax. Oracle uses the {{INVISIBLE}} keyword, DB2 uses {{IMPLICITLY HIDDEN}}.
            *A:* We use {{HIDDEN}} ???
            *Q:* Visibility of hidden columns in {{SHOW}} commands, in the {{INFORMATION_SCHEMA}} tables, in {{ALTER}}, etc. Oracle hides invisible columns in the informational commands too (and has a special view that shows them). DB2 hides them too, unless one uses a special form of the {{DESCRIBE}}} statement.
            *A:* Fully visible everywhere. They're only hidden from {{SELECT *}} and {{INSERT}} that does not specify the column list.
            *Q:* Replication. Are hidden columns written to binlog?
            *A:* User-hidden columns — absolutely. But others? {{ROWID}} pseudo-column should not be replicated, that's what "pseudo" mean. Hidden automatic primary key should be. Per-column setting?
            serg Sergei Golubchik made changes -
            Description The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            *Q:* What happens in one declares a hidden column that is {{NOT NULL}} and has no default value? Oracle returns an error at {{INSERT}} time if the column value was not provided. DB2 does not allow to create such a column.
            *A:* We'll do the latter, an error at {{CREATE TABLE}} time.
            *Q:* The syntax. Oracle uses the {{INVISIBLE}} keyword, DB2 uses {{IMPLICITLY HIDDEN}}.
            *A:* We use {{HIDDEN}} ???
            *Q:* Visibility of hidden columns in {{SHOW}} commands, in the {{INFORMATION_SCHEMA}} tables, in {{ALTER}}, etc. Oracle hides invisible columns in the informational commands too (and has a special view that shows them). DB2 hides them too, unless one uses a special form of the {{DESCRIBE}}} statement.
            *A:* Fully visible everywhere. They're only hidden from {{SELECT *}} and {{INSERT}} that does not specify the column list.
            *Q:* Replication. Are hidden columns written to binlog?
            *A:* User-hidden columns — absolutely. But others? {{ROWID}} pseudo-column should not be replicated, that's what "pseudo" mean. Hidden automatic primary key should be. Per-column setting?
            The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            *Q:* What happens in one declares a hidden column that is {{NOT NULL}} and has no default value? Oracle returns an error at {{INSERT}} time if the column value was not provided. DB2 does not allow to create such a column.
            *A:* We'll do the latter, an error at {{CREATE TABLE}} time.
            *Q:* The syntax. Oracle uses the {{INVISIBLE}} keyword, DB2 uses {{IMPLICITLY HIDDEN}}.
            *A:* We use {{HIDDEN}} ???
            *Q:* Visibility of hidden columns in {{SHOW}} commands, in the {{INFORMATION_SCHEMA}} tables, in {{ALTER}}, etc. Oracle hides invisible columns in the informational commands too (and has a special view that shows them). DB2 hides them too, unless one uses a special form of the {{DESCRIBE}}} statement.
            *A:* Fully visible everywhere. They're only hidden from {{SELECT *}} and {{INSERT}} that does not specify the column list.
            *Q:* Replication. Are hidden columns written to binlog?
            *A:* User-hidden columns — absolutely. But others? {{ROWID}} pseudo-column should not be replicated, that's what "pseudo" mean. Hidden automatic primary key should be. Per-column setting?
            *Q:* Indexes on hidden columns, are they hidden? What about indexes on a mix of hidden/visible columns?
            *A:* On user-visible columns, no and no. On more hidden — yes and impossible.
            serg Sergei Golubchik made changes -
            Fix Version/s 10.3 [ 22126 ]
            serg Sergei Golubchik made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Labels Compatibility 10.3-beta Compatibility
            ralf.gebhardt Ralf Gebhardt made changes -
            Epic Link PT-55 [ 62147 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Sachin Setiya [ sachin.setiya.007 ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            serg Sergei Golubchik made changes -
            Description The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            *Q:* What happens in one declares a hidden column that is {{NOT NULL}} and has no default value? Oracle returns an error at {{INSERT}} time if the column value was not provided. DB2 does not allow to create such a column.
            *A:* We'll do the latter, an error at {{CREATE TABLE}} time.
            *Q:* The syntax. Oracle uses the {{INVISIBLE}} keyword, DB2 uses {{IMPLICITLY HIDDEN}}.
            *A:* We use {{HIDDEN}} ???
            *Q:* Visibility of hidden columns in {{SHOW}} commands, in the {{INFORMATION_SCHEMA}} tables, in {{ALTER}}, etc. Oracle hides invisible columns in the informational commands too (and has a special view that shows them). DB2 hides them too, unless one uses a special form of the {{DESCRIBE}}} statement.
            *A:* Fully visible everywhere. They're only hidden from {{SELECT *}} and {{INSERT}} that does not specify the column list.
            *Q:* Replication. Are hidden columns written to binlog?
            *A:* User-hidden columns — absolutely. But others? {{ROWID}} pseudo-column should not be replicated, that's what "pseudo" mean. Hidden automatic primary key should be. Per-column setting?
            *Q:* Indexes on hidden columns, are they hidden? What about indexes on a mix of hidden/visible columns?
            *A:* On user-visible columns, no and no. On more hidden — yes and impossible.
            The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            *Q:* What happens in one declares a hidden column that is {{NOT NULL}} and has no default value? Oracle returns an error at {{INSERT}} time if the column value was not provided. DB2 does not allow to create such a column.
            *A:* We'll do the latter, an error at {{CREATE TABLE}} time.
            *Q:* The syntax. Oracle uses the {{INVISIBLE}} keyword, DB2 uses {{IMPLICITLY HIDDEN}}.
            *A:* We'll use {{INVISIBLE}}.
            *Q:* Visibility of hidden columns in {{SHOW}} commands, in the {{INFORMATION_SCHEMA}} tables, in {{ALTER}}, etc. Oracle hides invisible columns in the informational commands too (and has a special view that shows them). DB2 hides them too, unless one uses a special form of the {{DESCRIBE}}} statement.
            *A:* Fully visible everywhere. They're only hidden from {{SELECT *}} and {{INSERT}} that does not specify the column list.
            *Q:* Replication. Are hidden columns written to binlog?
            *A:* User-hidden columns — absolutely. But others? {{ROWID}} pseudo-column should not be replicated, that's what "pseudo" mean. Hidden automatic primary key should be. On the other hand, {{ROWID}} is engine-dependent, engine knows what to do with it. So we can replicate all hidden columns just normally. The engine will just not write down {{ROWID}}, if it feels like it.
            *Q:* Indexes on hidden columns, are they hidden? What about indexes on a mix of hidden/visible columns?
            *A:* On user-visible columns, no and no. On more hidden — yes and impossible.
            serg Sergei Golubchik made changes -
            Assignee Sachin Setiya [ sachin.setiya.007 ] Sergei Golubchik [ serg ]
            serg Sergei Golubchik made changes -
            Status Stalled [ 10000 ] In Review [ 10002 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Sachin Setiya [ sachin.setiya.007 ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            serg Sergei Golubchik made changes -
            sachin.setiya.007 Sachin Setiya (Inactive) made changes -
            Assignee Sachin Setiya [ sachin.setiya.007 ] Sergei Golubchik [ serg ]
            Status Stalled [ 10000 ] In Review [ 10002 ]
            sachin.setiya.007 Sachin Setiya (Inactive) made changes -
            Description The server might need to add columns to the table, for various internal purposes. These columns should be marked hidden — the user shouldn't see them. Depending on the application there can be different levels of "hiddeness":
            # Not hidden — normal columns created by the user
            # A little bit hidden — columns that the user has marked hiden. They aren't shown in {{SELECT *}} and they don't require values in {{INSERT table VALUE (...)}}. Otherwise they behave as normal columns.
            # More hidden — Can be queried explicitly, otherwise hidden from everything. Think {{ROWID}} pseudo-column. Because they're hidden from {{ALTER TABLE}} and from {{CREATE TABLE}} they cannot be created or dropped, they're created by the system.
            # Very hidden — as above, but cannot be queried either. They can only show up in {{EXPLAIN EXTENDED}} (might be possible for a very hidden indexed virtual column) but otherwise they don't exist for the user.

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            *Q:* What happens in one declares a hidden column that is {{NOT NULL}} and has no default value? Oracle returns an error at {{INSERT}} time if the column value was not provided. DB2 does not allow to create such a column.
            *A:* We'll do the latter, an error at {{CREATE TABLE}} time.
            *Q:* The syntax. Oracle uses the {{INVISIBLE}} keyword, DB2 uses {{IMPLICITLY HIDDEN}}.
            *A:* We'll use {{INVISIBLE}}.
            *Q:* Visibility of hidden columns in {{SHOW}} commands, in the {{INFORMATION_SCHEMA}} tables, in {{ALTER}}, etc. Oracle hides invisible columns in the informational commands too (and has a special view that shows them). DB2 hides them too, unless one uses a special form of the {{DESCRIBE}}} statement.
            *A:* Fully visible everywhere. They're only hidden from {{SELECT *}} and {{INSERT}} that does not specify the column list.
            *Q:* Replication. Are hidden columns written to binlog?
            *A:* User-hidden columns — absolutely. But others? {{ROWID}} pseudo-column should not be replicated, that's what "pseudo" mean. Hidden automatic primary key should be. On the other hand, {{ROWID}} is engine-dependent, engine knows what to do with it. So we can replicate all hidden columns just normally. The engine will just not write down {{ROWID}}, if it feels like it.
            *Q:* Indexes on hidden columns, are they hidden? What about indexes on a mix of hidden/visible columns?
            *A:* On user-visible columns, no and no. On more hidden — yes and impossible.
            This feature adds invisible column functionality to server.
            There is 4 level of "invisibility":

            1. Not invisible (NOT_INVISIBLE) — Normal columns created by the user

            2. A little bit invisible (USER_DEFINED_INVISIBLE) — columns that the
                user has marked invisible. They aren't shown in SELECT * and they
                don't require values in INSERT table VALUE (...). Otherwise
                they behave as normal columns.

            3. More invisible (SYSTEM_INVISIBLE) — Can be queried explicitly,
                otherwise invisible from everything. Think ROWID sytem column.
                Because they're invisible from ALTER TABLE and from CREATE TABLE
                they cannot be created or dropped, they're created by the system.
                User cant not create a column name which is same as of
                SYSTEM_INVISIBLE.

            4. Very invisible (COMPLETELY_INVISIBLE) — as above, but cannot be
                queried either. They can only show up in EXPLAIN EXTENDED (might
                be possible for a very invisible indexed virtual column) but
                otherwise they don't exist for the user.If user creates a columns
                which has same name as of COMPLETELY_INVISIBLE then
                COMPLETELY_INVISIBLE column is renamed again. So it is completely
                invisible from user.

            Invisible Index(HA_INVISIBLE_KEY):-
               Creation of invisible columns require a new type of index which
               will be only visible to system. User cant see/alter/create/delete
               this index. If user creates a index which is same name as of
               invisible index then it will be renamed.


            Syntax Details:-

              Only USER_DEFINED_INVISIBLE column can be created by user. This
              can be created by adding INVISIBLE suffix after column definition.

              Create table t1( a int invisible, b int);

            Rules:-
              There are some rules/restrictions related to use of invisible columns
              1. All the columns in table cant be invisible.
                 Create table t1(a int invisible); \\error
                 Create table t1(a int invisible, b int invisble); \\error
              2. If you want invisible column to be NOT NULL then you have to supply
                 Default value for the column.
                 Create table t1(a int, b int not null); \\error
              3. If you create a view/create table with select * then this wont copy
                 invisible fields. So newly created view/table wont have any invisible
                 columns.
                 Create table t2 as select * from t1;//t2 wont have t1 invisible column
                 Create view v1 as select * from t1;//v1 wont have t1 invisible column
              4. Invisibility wont be forwarded to next table in any case of create
                 table/view as select */(a,b,c) from table.
                 Create table t2 as select a,b,c from t1; // t2 will have t1 invisible
                                       // column(b), but this wont be invisible in t2
                 Create view v1 as select a,b,c from t1; // v1 will have t1 invisible
                                       // column(b), but this wont be invisible in v1

            See also [Invisible Columns in Oracle|https://oracle-base.com/articles/12c/invisible-columns-12cr1] and [Hidden Columns in DB2|https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0059345.html].

            *Q:* What happens in one declares a hidden column that is {{NOT NULL}} and has no default value? Oracle returns an error at {{INSERT}} time if the column value was not provided. DB2 does not allow to create such a column.
            *A:* We'll do the latter, an error at {{CREATE TABLE}} time.
            *Q:* The syntax. Oracle uses the {{INVISIBLE}} keyword, DB2 uses {{IMPLICITLY HIDDEN}}.
            *A:* We'll use {{INVISIBLE}}.
            *Q:* Visibility of hidden columns in {{SHOW}} commands, in the {{INFORMATION_SCHEMA}} tables, in {{ALTER}}, etc. Oracle hides invisible columns in the informational commands too (and has a special view that shows them). DB2 hides them too, unless one uses a special form of the {{DESCRIBE}}} statement.
            *A:* Fully visible everywhere. They're only hidden from {{SELECT *}} and {{INSERT}} that does not specify the column list.
            *Q:* Replication. Are hidden columns written to binlog?
            *A:* User-hidden columns — absolutely. But others? {{ROWID}} pseudo-column should not be replicated, that's what "pseudo" mean. Hidden automatic primary key should be. On the other hand, {{ROWID}} is engine-dependent, engine knows what to do with it. So we can replicate all hidden columns just normally. The engine will just not write down {{ROWID}}, if it feels like it.
            *Q:* Indexes on hidden columns, are they hidden? What about indexes on a mix of hidden/visible columns?
            *A:* On user-visible columns, no and no. On more hidden — yes and impossible.
            sachin.setiya.007 Sachin Setiya (Inactive) made changes -
            Summary Hidden columns Invisible column And Invisible Index
            serg Sergei Golubchik made changes -
            Summary Invisible column And Invisible Index Invisible columns
            serg Sergei Golubchik made changes -
            Fix Version/s 10.3.3 [ 22644 ]
            Fix Version/s 10.3 [ 22126 ]
            Assignee Sergei Golubchik [ serg ] Sachin Setiya [ sachin.setiya.007 ]
            Resolution Fixed [ 1 ]
            Status In Review [ 10002 ] Closed [ 6 ]
            mg MG made changes -
            serg Sergei Golubchik made changes -
            Comment [ MariaDB [p]> create table b3(a int hidden not null);
            ERROR 1981 (HY000): Hidden column 'a' either allow null values or it must have default value

            https://isqlplus.com/big-data-analytics/
            https://momboleh.com/12-tips-for-a-working-mom/
            https://medxjobs.com/taking-back-your-time/ ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 75895 ] MariaDB v4 [ 132892 ]
            anel Anel Husakovic made changes -

            People

              sachin.setiya.007 Sachin Setiya (Inactive)
              serg Sergei Golubchik
              Votes:
              3 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.