The method ________ is used to execute SQL for DDL statements using JDBC.

  • executeDDL()
  • executeQuery()
  • executeStatement()
  • executeUpdate()
In JDBC, the method executeUpdate() is used to execute SQL statements that perform Data Definition Language (DDL) operations, such as creating, altering, or dropping database objects. It returns an integer representing the number of rows affected by the statement. executeQuery() is used for retrieving data, not DDL statements.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *