(SQL) SQL (2014)

New SQL Server project templates for VS2015 (Create Table SysVersioned.sql)

   1:  CREATE TABLE $SchemaQualifiedObjectName$
   2:  (
   3:      [Id] INT NOT NULL PRIMARY KEY,
   4:      [SysStart] DATETIME2 (7) GENERATED ALWAYS AS ROW START NOT NULL,
   5:      [SysEnd] DATETIME2 (7) GENERATED ALWAYS AS ROW END NOT NULL,
   6:      PERIOD FOR SYSTEM_TIME ([SysStart], [SysEnd])
   7:  )
   8:  WITH (SYSTEM_VERSIONING = ON(HISTORY_TABLE=[$SchemaName$].[$rawname$_HISTORY], DATA_CONSISTENCY_CHECK=ON))


Comments ( )
Link to this page: //www.vb-net.com/VS2015-SQL-Server-Project-Templates/Create-Table-SysVersioned-sql.htm
< THANKS ME>