Reputation: 3113
I didn't found any documentation about. What is the possible options for the information_schema.columns table extra
column. Currently I just get auto_increment. I just building a migrater and I want to cover every possibilites.
The SQL query which get it:
SELECT EXTRA
FROM information_schema.COLUMNS;
Upvotes: 3
Views: 1013
Reputation: 65567
Although the full list of possible values for that column is not documented for The INFORMATION_SCHEMA COLUMNS Table, you can find it on the manual page for SHOW COLUMNS Syntax:
The Extra field contains any additional information that is available about a given column. The value is nonempty in these cases:
auto_increment for columns that have the AUTO_INCREMENT attribute
on update CURRENT_TIMESTAMP for TIMESTAMP or DATETIME columns that have the ON UPDATE CURRENT_TIMESTAMP attribute
VIRTUAL GENERATED or STORED GENERATED for generated columns
Note that the VIRTUAL GENERATED
and STORED GENERATED
values are new in MySQL 5.7, and it's possible that more values will be added in MySQL 8.0 and beyond.
Upvotes: 4