List:General Discussion« Previous MessageNext Message »
From:RenĂ© Moonen Date:June 20 2002 3:16pm
Subject:Re: Query for consecutive records?
View as plain text  
And a "SELECT min(id) FROM table" also when the incrementing integer 
does not start at 1

René


John Klein wrote:

>mark.riehl@stripped wrote:
>  
>
>>All - I've got a table containing sniffed network traffic, and it has column
>>that should contain a unique incrementing integer (not starting at 1).  Is
>>there an easy SQL query to verify that the numbers are consecutive (i.e., I
>>didn't miss any records)?
>>    
>>
>
>If the number is unique in your DB, do a count of the rows and compare
>that with the largest id. (That is, "SELECT count(id) FROM table" and then
>"SELECT max(id) FROM table".)
>
>  
>


Thread
Query for consecutive records?Mark Riehl20 Jun
Re: Query for consecutive records?John Klein20 Jun
Re: Query for consecutive records?RenĂ© Moonen20 Jun