text: ﻿USE [DemoDB]
  GO
  
  DROP TABLE IF EXISTS InMemoryTemporal
  
  CREATE TABLE dbo.InMemoryTemporal(
  	COl1 int NOT NULL PRIMARY KEY NONCLUSTERED ,
  	Col2 uniqueidentifier,
  	SysStartTime datetime2 GENERATED ALWAYS AS ROW START HIDDEN NOT NULL , 
  	SysEndTime datetime2 GENERATED ALWAYS AS ROW END HIDDEN NOT NULL,
  	PERIOD FOR SYSTEM_TIME (SysStartTime,SysEndTime) 
  ) WITH (MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_AND_DATA, SYSTEM_VERSIONING = ON )
  
  
  
  INSERT INTO InMemoryTemporal VALUES(1,NEWID()),(2,NEWID()),(3,NEWID()) ,(4,NEWID()) ,(5,NEWID()) 
  
  UPDATE InMemoryTemporal SET Col2 = NEWID() WHERE Col1 = 1
  DELETE FROM InMemoryTemporal  WHERE Col1 = 2
  
  SELECT * FROM InMemoryTemporal
  SELECT * FROM InMemoryTemporal FOR SYSTEM_TIME ALL
  