title: SQL server 2017 issue with datetime datatype
body: <p>I have a simple table which consists of 5 records with a difference of milliseconds.
  I have faced issue while upgraded my database from <strong>2016 to 2017 SQL server.</strong> 
  There are two images attached here with comparing the result of 2016 and 2017 SQL server result. I am not understanding why this unwanted behavior in 2017. </p>
  
  <p>Is this a bug in 2017 SQL server. ?</p>
  
  <p>Table column data type is same here in both cases <strong>datetime</strong> datatype. </p>
  
  <p><a href="https://i.stack.imgur.com/fJtpr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fJtpr.png" alt="SQL server 2016 output"></a></p>
  
  <p><a href="https://i.stack.imgur.com/T8eUL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T8eUL.png" alt="SQL server 2017 output"></a></p>
  
  <p>Here is the create table query. </p>
  
  <pre><code>    USE [Test]
      GO
  
      CREATE TABLE [dbo].[TestVisionBot3](
          [FileId] [varchar](50) NULL,
          [OrgId] [nchar](10) NOT NULL,
          [ProjectId] [varchar](50) NULL,
          [CreatedAt] [datetime] NULL,
          [LockedUserid] [nvarchar](50) NULL
      ) ON [PRIMARY]
      GO
  </code></pre>
  
  <p>Here is the sample data as well.</p>
  
  <pre><code>    1a  1           2a  2018-04-29 10:30:30.010 test
      3a  1           2a  2018-04-29 10:30:30.553 test
      2a  1           2a  2018-04-29 10:30:30.557 test
      4a  1           2a  2018-04-29 10:30:30.560 test
      5a  1           2a  2018-04-29 10:30:30.563 test
  </code></pre>