MCQ: Which of the following method is used to perform DML statements in JDBC?

Which of the following method is used to perform DML statements in JDBC?

  1. executeResult()
  2. executeQuery()
  3. executeUpdate()
  4. execute()

Answer

c. executeUpdate()

Explanation:

We use the executeUpdate() method for DML SQL queries that change data in the database, such as INSERT, UPDATE, and DELETE which do not return a resultset.


Comments