I'm struggling with the wording, but there's a difference which is not completely clear. ON is the value for SYSTEM_VERSIONING which is an option of CREATE TABLE. HISTORY _TABLE and DATA_CONSISTENCY_CHECK are the parameters that can be defined for SYSTEM_VERSIONING (with their corresponding values).
CREATE TABLE Department
DeptID int NOT NULL PRIMARY KEY CLUSTERED
, DeptName varchar(50) NOT NULL
, ManagerID INT NULL
, ParentDeptID int NULL
, SysStartTime datetime2 GENERATED ALWAYS AS ROW START NOT NULL
, SysEndTime datetime2 GENERATED ALWAYS AS ROW END NOT NULL
, PERIOD FOR SYSTEM_TIME (SysStartTime,SysEndTime)
WITH (SYSTEM_VERSIONING = ON (HISTORY_TABLE = dbo.DepartmentHistory))
How to post data/code on a forum to get the best help: Option 1 / Option 2
Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?