Originally Posted by
bugger
select count(*) from tablename where ...
I do this all the time. What problem do you have?
You have to use a relative resultSet.getInteger(0));
to pull the value out, since "count(*)" is not named, but it works great.
Its bad form to get all the individual records (as others have suggested) when all you want is the count(*) value
You can do this for other functions, such as min(fieldX), max(), etc.