Skip to content
Advertisement

Tag: minimum

Get minimum unused value in MySQL column

I have a table with integer ID column. I would like to get the minimum unused value for this column. The query should find the first hole in table IDs and get the minimum value inside it. I’ll try to explain it with some examples. Example 1: no-holes table In this case, I have a table without holes and query

Advertisement