How to get id which are not?

There is a table with an id field (INT)
The id field is unique.

We know the range in which id.
How to write a query that outputs the id of the row which do not exist in the table?

Example
id
1
2
3
4
5
7
8
9

In the range from 1 to 9 the query should produce 6 because such id is missing.
July 9th 19 at 13:15
1 answer
July 9th 19 at 13:17
Solution

Find more questions by tags MySQLSQL