Sample Header Ad - 728x90

What are "Invisible Columns" and how are they used?

6 votes
3 answers
6381 views
I saw a new feature Invisible Columns in MariaDB 10.3.x. What are practical use cases for DBA and web developer? When to use this feature? > Columns can be given an INVISIBLE attribute in a CREATE TABLE or `ALTER > TABLE` statement. These columns will then not be listed in the results > of a SELECT * statement, nor do they need to be assigned a value in an > INSERT statement, unless INSERT explicitly mentions them by name. > > Since SELECT * does not return the invisible columns, new tables or > views created in this manner will have no trace of the invisible > columns. If specifically referenced in the SELECT statement, the > columns will be brought into the view/new table, but the INVISIBLE > attribute will not. > > Invisible columns can be declared as NOT NULL, but then require a > DEFAULT value
Asked by Sybil (2578 rep)
Jul 14, 2018, 06:54 PM
Last activity: Mar 7, 2025, 06:46 PM