Finding missing row in a table - MySQL - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Finding missing row in a table - MySQL (
/showthread.php?tid=311063)
Finding missing row in a table - MySQL -
-Prodigy- - 14.01.2012
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..
Re: Finding missing row in a table - MySQL -
Vince - 14.01.2012
For what purpose? As far as I know there's no function to easily detected gaps between sequential numbers.
Re: Finding missing row in a table - MySQL -
Jefff - 15.01.2012
Update table to NULL and then select + limit 1