JDBC Statement Example

Statement interface object is used to execute queries.

  • It executes query immediately without compiling
  • It has 3 methods to execute query
    • execute(“sql query”)
    • executeQuery(“sql query”)
    • executeUpdate(“sql query”)
  • Each of them throws SQLException