SELECT SYSDATETIME();
GO
DECLARE @d DATETIME2(7) = SYSDATETIME();
GO 10000
SELECT SYSDATETIME();
GO
DECLARE @d DATETIME = SYSDATETIME();
GO 10000
SELECT SYSDATETIME();
GO
DECLARE @d DATETIME2(7) = GETDATE();
GO 10000
SELECT SYSDATETIME();
GO
DECLARE @d DATETIME = GETDATE();
GO 10000
SELECT SYSDATETIME();
Results:
- Assigning SYSDATETIME to DATETIME2(7) : 3.4 s
- Assigning SYSDATETIME to DATETIME : 3.3 s
- Assigning GETDATE to DATETIME2(7) : 3.4 s
- Assigning GETDATE to DATETIME : 3.3 s
So it appears to not matter. What matters is what type of variable you assign it to, and even that is not by much. 10000/0.1 seconds means the delta is very, very small and not enough to worry about. I would rather be consistent in this case.