How to Create a Generated Column in MariaDB

A generated column is a database column whose value is an expression. Therefore, the value of the generated column is usually derived (for example, it could be derived from values in other columns).

Generated columns are also sometimes referred to as computed columns or virtual columns.

Creating a generated column in MariaDB is essentially the same as creating a normal column. The difference is that the definition of the generated column contains an expression that determines the column’s value.

Continue reading