-
StackOverflow 文档
-
Microsoft SQL Server 教程
-
内存中的 OLTP(Hekaton)
-
创建内存优化系统版本的时态表
CREATE TABLE [dbo].[MemOptimizedTemporalTable]
(
[BusinessDocNo] [bigint] NOT NULL,
[ProductCode] [int] NOT NULL,
[UnitID] [tinyint] NOT NULL,
[PriceID] [tinyint] NOT NULL,
[SysStartTime] [datetime2](7) GENERATED ALWAYS AS ROW START NOT NULL,
[SysEndTime] [datetime2](7) GENERATED ALWAYS AS ROW END NOT NULL,
PERIOD FOR SYSTEM_TIME ([SysStartTime], [SysEndTime]),
CONSTRAINT [PK_MemOptimizedTemporalTable] PRIMARY KEY NONCLUSTERED
(
[BusinessDocNo] ASC,
[ProductCode] ASC
)
)
WITH (
MEMORY_OPTIMIZED = ON , DURABILITY = SCHEMA_AND_DATA, -- Memory Optimized Option ON
SYSTEM_VERSIONING = ON (HISTORY_TABLE = [dbo].[MemOptimizedTemporalTable_History] , DATA_CONSISTENCY_CHECK = ON )
)
更多信息