clear markdown compare help donate or buy diddy dollings comments/suggestions/bugs a leap of faith? bible365
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 818526 fiddles created (9182 in the last week).

-- Large Data Set CREATE TABLE #tmp ( ID INT PRIMARY KEY CLUSTERED ) INSERT INTO #tmp -- Purposely insert in reverse order SELECT TOP 100 PERCENT RN FROM ( SELECT TOP (10000000) ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) RN FROM master..spt_values t1 CROSS JOIN master..spt_values t2 ) x ORDER BY RN DESC -- Smaller Data Set CREATE TABLE #tmp2 ( ID INT PRIMARY KEY CLUSTERED ) INSERT INTO #tmp2 -- Purposely insert in reverse order SELECT TOP 100 PERCENT RN FROM ( SELECT TOP (10000) ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) RN FROM master..spt_values t1 CROSS JOIN master..spt_values t2 ) x ORDER BY RN DESC -- Large Record Set -- Clustered Key Not Honored* SELECT TOP 10 * FROM #tmp -- Small Record Set -- Clustered Key Honored SELECT TOP 10 * FROM #tmp2 DROP TABLE #tmp DROP TABLE #tmp2
ID
5040689
5040690
5040691
5040692
5040693
5040694
5040695
5040696
5040697
5040698
ID
1
2
3
4
5
6
7
8
9
10
 hidden batch(es)