Lets say you have the following table:
CREATE TABLE [dbo].[Test]
(
[Value] [sql_variant] NOT NULL
)
And lets insert some DATETIME2 values:
INSERT INTO [dbo].[Test]
(
[Value]
)
VALUES
(
SYSUTCDATETIME()
)
Now, lets see the results:
SELECT
[Value],
SQL_VARIANT_PROPERTY([Value], 'BaseType') AS BaseType
FROM
[dbo].[Test]
Value BaseType
-----------------------------------
2019-11-25 19:39:43.274 datetime2
2019-11-25 19:43:49.735 datetime2
Why do the values get truncated?