Skip to content

Commit b3286ff

Browse files
committed
#693 Support for temporal tables. Thanks to FaizulHussain
1 parent 24cbdd5 commit b3286ff

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

TestDatabases/SQLServer/EfrpgTest (manually created).sql

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2644,3 +2644,16 @@ BEGIN
26442644
SET @SecondOutParam = SCOPE_IDENTITY();
26452645
END;
26462646
GO
2647+
2648+
-- #693 Support for temporal tables
2649+
CREATE TABLE dbo.TemporalDepartment
2650+
(
2651+
DeptID INT NOT NULL PRIMARY KEY CLUSTERED,
2652+
DeptName VARCHAR(50) NOT NULL,
2653+
ManagerID INT NULL,
2654+
ParentDeptID INT NULL,
2655+
SysStartTime DATETIME2 GENERATED ALWAYS AS ROW START NOT NULL,
2656+
SysEndTime DATETIME2 GENERATED ALWAYS AS ROW END NOT NULL,
2657+
PERIOD FOR SYSTEM_TIME(SysStartTime, SysEndTime)
2658+
)
2659+
WITH (SYSTEM_VERSIONING = ON (HISTORY_TABLE = dbo.TemporalDepartmentHistory));
13.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)