0

I am wondering if it is possible to get a query that will take a range of numbers, in this case 8 to 17, compare it against a field in a table and remove the ones that do appear in the table and return the rest?

I assume the peusdo code would look something like

Select nums from range(8-17) where nums not in (select column from table)

Is this possible at all?

Edit To clarify my question.

In table I might have the following:

Intnumber
9
10
16

I would like to have the numbers between 8-17 that do not appear in this table, so 8,11,12,13,14,15,17

Kind regards

Matt

Matt Bartlett
  • 348
  • 1
  • 3
  • 21

1 Answers1

0

select nums from table where nums not between 8 and 17;

matea
  • 3
  • 2
  • 1
    Welcome to StackOverflow! While this answer is probably correct and useful, it is preferred if you include some explanation along with it to explain how it helps to solve the problem. This becomes especially useful in the future, if there is a change (possibly unrelated) that causes it to stop working and users need to understand how it once worked. – Erty Seidohl Jun 15 '18 at 18:09