Created
April 1, 2020 07:22
-
-
Save zafergurel/84d1b0a58b44306840df39ad300c1ffe to your computer and use it in GitHub Desktop.
test sql server cores
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE master | |
SELECT MyInt = CONVERT(BIGINT, o1.object_id) + CONVERT(BIGINT, o2.object_id) + CONVERT(BIGINT, o3.object_id) | |
INTO #temp | |
FROM sys.objects o1 | |
JOIN sys.objects o2 ON o1.object_id < o2.object_id | |
JOIN sys.objects o3 ON o1.object_id < o3.object_id | |
SELECT SUM(CONVERT(BIGINT, o1.MyInt) + CONVERT(BIGINT, o2.MyInt)) | |
FROM #temp o1 | |
JOIN #temp o2 ON o1.MyInt < o2.MyInt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment