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.
Loading...
Related Quiz
- What is the purpose of using getters and setters in Java?
- In which scenarios is it recommended to create a custom exception instead of using a standard Java exception?
- What will happen if two constructors in a class have the same parameter list in Java?
- The keyword ________ is used to skip the rest of the current loop iteration.
- What does the Future interface represent in Java concurrency?