Tutorial 5
Tutorial 5
Tutorial 5
11. In JDBC, which exception is thrown when there is a problem with the SQL syntax?
a) SQLException b) SQLSyntaxException c) SQLQueryException d) SyntaxError
12. Which method is used to execute a query in JDBC and retrieve the results in a `ResultSet`?
a) executeQuery() b) executeUpdate() c) execute() d) executeBatch()
26. The package contains classes that help in connecting to a database, sending SQL statements to the database and process
the query request.
(a)connection.sql (b)b.sql (c)pkg.sql (d)java.sql
28.In JDBC imports all Java classes that are concern with Database connectivity.
(a) javax.sql (b)java.mysql (c)java.sql (d)com.sql
30.In the below statement, which type of query can be used with executeUpdate() method. statement.executeUpdate(query here)
(a)Insert, Update, Delete (b)Insert, Select, Delete (c)Only Select (d) Any Query