Finding missing row in a table - MySQL
#1

Let's say I have a table with fields:

Код:
Number     Value     Value
1          5         5
2          5         5
3          5         5
4          5         5

6          5         5
7          5         5
8          5         5
9          5         5
--
How would I go about finding the missing row. Which would be 5. Then create the row and arrange it, so it keeps going in order: 4, 5, 6..
Reply
#2

For what purpose? As far as I know there's no function to easily detected gaps between sequential numbers.
Reply
#3

Update table to NULL and then select + limit 1
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)