Hello
I have a table which a column holding UserIds of type bigint(5)
Usually I will have consecutive UserIds in the table, i.e.: 1,2, 3,4,...
However, it is possible that the table will have whole holes in the data: 1,2,5,6, 8,...
Is it possible to detect such holes using SQL?
for example, if the data is: 1,2,5,6,8
then I would like to get the lowest missing id. In the above example it would be 3
thanks in advance