Select from following answers:- DATETIME2 column for tracking StartTime
- DATETIME2 column for tracking EndTime
- PERIOD column
- all of above
- All Above
To define Temporal Table, it must have one Primary Key column, 2 DATETIME2 columns and other PERIOD column
for example,
CREATE TABLE Employee
(
[EmployeeID] int NOT NULL PRIMARY KEY CLUSTERED
, [Name] nvarchar(100) NOT NULL
, [ValidFrom] datetime2 (2) GENERATED ALWAYS AS ROW START
, [ValidTo] datetime2 (2) GENERATED ALWAYS AS ROW END
, PERIOD FOR SYSTEM_TIME (ValidFrom, ValidTo)
)
WITH (SYSTEM_VERSIONING = ON (HISTORY_TABLE = dbo.EmployeeHistory));
Show Correct Answer
|
Alert Moderator