What happens if you define DATETIME2 columns as Nullable in Temporal table ?

CREATE TABLE Employee

  [EmployeeID] int NOT NULL PRIMARY KEY CLUSTERED
  , [Name] nvarchar(100) NOT NULL
  , [ValidFrom] datetime2 (2) GENERATED ALWAYS AS ROW START NULL
  , [ValidTo] datetime2 (2) GENERATED ALWAYS AS ROW END
  , PERIOD FOR SYSTEM_TIME (ValidFrom, ValidTo)
 ) 
 WITH (SYSTEM_VERSIONING = ON (HISTORY_TABLE = dbo.EmployeeHistory));

 Posted by Bandi on 8/31/2017 | Category: Sql Server Interview questions | Views: 5446 | Points: 40
Select from following answers:
  1. Exception
  2. creates table as temporal table
  3. creates table as normal
  4. All Above

Show Correct Answer


| Alert Moderator 

Comments or Responses

Posted by: Myrtletran on: 3/13/2018 | Points: 10
it's wrong

Login to post response