Forum Stats

  • 3,874,167 Users
  • 2,266,675 Discussions
  • 7,911,746 Comments

Discussions

How does temporal tables work in Mysql?

User_8112A
User_8112A Member Posts: 3 Green Ribbon

In microsoft sql server (t-sql), temporal table query is:

CREATE TABLE Department

(

  DeptID INT NOT NULL PRIMARY KEY CLUSTERED

 , DeptName VARCHAR(50) NOT NULL

 , ValidFrom DATETIME2 GENERATED ALWAYS AS ROW START NOT NULL

 , ValidTo DATETIME2 GENERATED ALWAYS AS ROW END NOT NULL

 , PERIOD FOR SYSTEM_TIME (ValidFrom, ValidTo)

)

WITH (SYSTEM_VERSIONING = ON);

What is the equivalent in mysql temporal table query as i am new to my sql?

Answers