Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
Description
Doc link:
https://mariadb.com/kb/en/library/temporal-data-tables/#adding-and-removing-time-periods
CREATE TABLE test.t2 ( |
id INT PRIMARY KEY, |
time_1 TIMESTAMP(6), |
time_2 TIMESTAMP(2) |
);
|
And then the alter follows resulted with error as:
MariaDB [test]> ALTER TABLE test.t2 ADD PERIOD FOR time_period(time_1, time_2); |
ERROR 4153 (HY000): Fields of PERIOD FOR `time_period` have different types |
So it seems to be the create statement of table should be instead:
CREATE TABLE test.t2 ( |
id INT PRIMARY KEY, |
time_1 TIMESTAMP(6), |
time_2 TIMESTAMP(6) |
);
|