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: 2409 | 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
Posted by: Vikasdotnet on: 6/12/2018 | Points: 10
really nice post.
if you want to know the technologies updates,visit below site.
http://www.dotnetbasic.com

Login to post response