I have a Clients
table already populated by thousands of records and now I need to search for a non-existing number in the card number
column starting from the number x
.
Example: I would like to search for the first available card number
starting from number 2000.
Unfortunately I cannot select MAX()
as there are records with 9999999 (which is the limit).
Is it possible to do this search through a single SELECT
?