A
A
Alesk892016-05-18 19:00:07
MySQL
Alesk89, 2016-05-18 19:00:07

How to get id's that don't exist?

There is a table with a field id (INT)
The id field is unique.
We know the range the id's are in.
How to write a query that returns id, rows for which are not in the table?
Example
id
1
2
3
4
5
7
8
9
In the range from 1 to 9, the query should return 6 because there is no such id.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cat Anton, 2016-05-18
@Alesk89

stackoverflow.com/questions/12325132/mysql-get-mis...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question