How to check if select query is returning more than one value in java -


i executing select query through preparedstatment, have raise exception in basis of if resultset contains more 1 value,so question how determine rs returning multiple values.?

try this:

resultset lresult = stmt.executequery("select a,b,c yourtable"); boolean lmorethanone = lresult.first() && lresult.next(); 

Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -