What is the difference in executeQuery and executeUpdate?

1

What's the difference and when should I use executeQuery() or executeUpdate() ?

    
asked by anonymous 12.07.2018 / 06:15

1 answer

9

I imagine that it is without the point, if it is with the point I would have to find out what you are talking about.

executeQuery() as the name itself says, it is for queries, it almost always uses a SELECT in it and a result will be returned with the data, or an error.

executeUpdate() as its name says, it is for updates, you should use a written command like INSERT , UPDATE and DELETE , and it returns what has been affected and not a result of data.

    
12.07.2018 / 06:34