Created
October 10, 2014 16:16
-
-
Save parabola949/e1c688c2e208a5ef0841 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
DECLARE @numberlist table(number int) | |
-- TOP <max> IDENTITY(int,<min>,1) | |
SELECT TOP 5 IDENTITY(int,1,1) as Number | |
INTO numberlist | |
from sys.objects s1 CROSS JOIN sys.objects s2 | |
--Now check range against stuff table | |
SELECT * | |
FROM numberlist | |
WHERE number NOT IN (Select Number from Stuff) | |
DROP TABLE numberlist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment