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

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

Android Gson.fromJson error -