I'm not sure that I understand what you are trying to do

So
why do you want to get the highest number or the whole Thing re-numbered? What is it good for?
first i want to thanx all here for their help. i menaged to make my first b4j mysql app that i will share here incl. source code (my first touch
on mysql started 2 days ago and thanx to
@KMatle examples i could make it)
the reason i wanted to renumber or get the highest id is because if i want to update or delete an entry i need a uniq value for it. so an id is a uniq value that only 1 entry can have
like this i write UPDATE ... WHERE id='$id'"
or DELETE ... WHERE id='$id'"
so after i delete an entry the problems starts so if i had 5 entries with and id fro 0 to 4
0...
1...
2...
3...
4...
and i deleted entry with the id 2 then i have now
0...
1...
3...
4...
so now i need to know when i will insert a new entry what id should i choose so i ask for the highest id in my table and add 1 to it
this is the reason i needed it, but i solved it by reading all entries and adding only the id to a list and look for the highest id
i dont know why SELECT MAX(id) FROM table does not work
do you know a faster solution for my problem?