Skip to content
Advertisement

Get max value sql in Java

*I don’t get value of max in function other. Value return is “0”. I trying but not success 🙁 Image

Help!!!

Advertisement

Answer

You’re not using it as it should be.

First of all, you use AVG but want MAX so change it to MAX(GiaSP). Second, you must use rs.next() to have your cursor go to the first row and then get information from it.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement