This article contains an example of adding a generated column to a table in MySQL.
Also known as computed columns, generated columns usually contain values that are dependent on other factors (such as the values in other columns).
Creating (or adding) a generated column in MySQL is basically the same as creating a normal column, except that the definition of the generated column contains an expression that determines the column’s value.
Continue reading