I have a MySQL table as follows:
+--------+-------+ | Server | Port | +--------+-------+ | 1 | 27001 | | 2 | 27002 | | 4 | 27004 | +--------+-------+
As you can see, port 27003 was here, but it was deleted some time ago (for example, for example).
Is there a way to find out the minimum value that is not used (e.g. more than 27000) in the mysql table? Or is there no way, and I need to create a separate table with all ports and columns with βusedβ or βnot usedβ?
Explanation of the situation: I am creating a website for hosting games, and I can use auto-increment for ports, but after a while I will have many remote / unused ports, and I want to use all of them before expanding the range of ports.
source share