Problem
In a table X and I have N records, however these records are not sequential (throughout insert ), Id will always be greater than previous, but not necessarily the number following the previous one.)
I need to know what id's do not have in the bank.
Example
SELECT Id FROM X
Return
Id
1
2
4
8
12
I need to return the id's 3,5,6,7,9,10,11
that are missing.
I searched a lot, but only found results in English and these results unfortunately did not solve the problem.
Question
How to create a query that can solve this in just one column and without creating other tables?