You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In SQL Server 2016, we can use system version tables which will have hidden auto generated columns. When running against, SQL Server 2016 or above, these columns should be excluded. This can be fixed by adding additional WHERE condition to the generated schemaSql.
if SELECT SERVERPROPERTY ('ProductMajorVersion') >= 13, then append "AND c.generated_always_type_desc NOT IN (N'AS_ROW_START',N'AS_ROW_END')"
The text was updated successfully, but these errors were encountered:
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)
;
In SQL Server 2016, we can use system version tables which will have hidden auto generated columns. When running against, SQL Server 2016 or above, these columns should be excluded. This can be fixed by adding additional WHERE condition to the generated schemaSql.
if SELECT SERVERPROPERTY ('ProductMajorVersion') >= 13, then append "AND c.generated_always_type_desc NOT IN (N'AS_ROW_START',N'AS_ROW_END')"
The text was updated successfully, but these errors were encountered: