Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
CF
Starting Member
4 Posts |
Posted - 2007-02-21 : 09:05:31
|
| I have an 'ID' column. I'm up to about ID number 40000, but not all are in use, so ID 4354 might not be in any row. I want a list of all numbers which aren't in use. I want to write something like this:select [numbers from 0 to 40000] where <number> not in (select distinct id from mytable)but don't know how. Any clues? |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
|
|
|