Issue link: http://hub-nl.insight.com/i/692679
65 C H A P T E R 5 | Broader data access
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductInventory_Temporal_Auto_ProductID_LocationID] PRIMARY KEY CLUSTERED
(
[ProductID] ASC,
[LocationID] ASC
), ValidFrom datetime2(7) GENERATED ALWAYS AS ROW START NOT NULL,
ValidTo datetime2(7) GENERATED ALWAYS AS ROW END NOT NULL,
PERIOD FOR SYSTEM_TIME (ValidFrom, ValidTo)
)
WITH (SYSTEM_VERSIONING = ON);
Note When you create a temporal table with an anonymous history table, you must have the
CREATE TABLE permission in the database and ALTER PERMISSION on the schema for the new
current and history tables.
When you execute the CREATE TABLE statement, the database engine creates the temporal table as
you defined it. It also creates the history table as a rowstore table with page compression if possible
and names it MSSQL_TemporalHistoryFor_