1. Create a table
2. Add SYSTEM VERSIONING as follows per documentation at https://mariadb.com/kb/en/library/system-versioned-tables/
ALTER TABLE t ADD COLUMN ts TIMESTAMP(6) GENERATED ALWAYS AS ROW START,
|
ADD COLUMN te TIMESTAMP(6) GENERATED ALWAYS AS ROW END,
|
ADD PERIOD FOR SYSTEM_TIME(ts, te),
|
ADD SYSTEM VERSIONING;
|
3. Execute a SHOW COLUMNS on table.
MariaDB [test_database]> show columns from t;
|
+-------+--------------+------+-----+---------+----------------+
|
| Field | Type | Null | Key | Default | Extra |
|
+-------+--------------+------+-----+---------+----------------+
|
| col1 | bigint(20) | NO | PRI | NULL | auto_increment |
|
| ts | timestamp(6) | NO | | NULL | |
|
| te | timestamp(6) | NO | PRI | NULL | |
|
+-------+--------------+------+-----+---------+----------------+
|
`ts` and `te` should list GENERATED in the Extra field.