I have a table like this.
Seq_no date
----------- -----------
0000 01-apr-2014
0001 01-apr-2014
0002 01-apr-2014
.......
9999 10-apr-2014
0000 11-apr-2014
0001 11-apr-2014
.......
The last digit of sequence number start with 0000 and end with 9999 and when last digit exceeds 9999 it reset to 0000.
My question is : how can we find the missing sequence number for that column.