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 aCREATE TABLE
orALTER TABLE
statement. These columns will then not be listed in the results of aSELECT *
statement, nor do they need to be assigned a value in anINSERT
statement, unlessINSERT
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 theSELECT
statement, the columns will be brought into the view/new table, but theINVISIBLE
attribute will not.Invisible columns can be declared as
NOT NULL
, but then require aDEFAULT
value