WEB LISTING B: Code That Uses a 5-Second Loop to Rapidly Populate the TestDates Table DECLARE @CurrentLooptime datetime , @EndLooptime datetime SELECT @CurrentLooptime = getdate() , @EndLooptime = dateadd(ss, 5, getdate()) WHILE @CurrentLooptime < @EndLooptime BEGIN INSERT dbo.TestDates VALUES (getdate(), getdate()) SELECT @CurrentLooptime = getdate() END GO -- This query will show the total number of distinct datetime and smalldatetime values. SELECT COUNT(*) AS TotalRowCount , COUNT(distinct DatetimeCol) AS DistinctDTRows , COUNT(distinct SmallDatetimeCol) AS DistinctSDTRows FROM dbo.TestDates GO