JDBC Interview Questions

Most Frequent JDBC Interview questions based on memories of students and experienced candidate in various campus drives. This may help you to crack JDBC interview easily.

  1. What is JDBC API contains?
  2. What is the difference between JDBC drivers?
  3. What is the fastest type of JDBC driver?
  4. What are collection pools? What are the advantages?
  5. What is JDBC Connection? Explain steps of database connection to a java program.
  6. What is the use of JDBC DriverManager class?
  7. What is JDBC Statement?
  8. What is the difference between Statement, PreparedStatement and CallableStatemen?
  9. What is the difference between execute, executeQuery, executeUpdate?
  10. How to set NULL values in JDBC PreparedStatement?
  11. What is the use of getGeneratedKeys() method in Statement?
  12. What are the benefits of PreparedStatement over Statement?
  13. What is the limitation of PreparedStatement and how to overcome it?
  14. What is JDBC RowSet? What are different types of RowSet?
  15. What is the different between ResultSet and RowSet?
  16. What are common JDBC Exceptions?
  17. What is CLOB and BLOB datatypes in JDBC?
  18. What is JDBC ResultSet?
  19. What are different types of ResultSet?
  20. How to use JDBC API to call Stored Procedures?
  21. What is JDBC Batch Processing and what are it’s benefits?
  22. What is JDBC Transaction Management and why do we need it?
  23. How to rollback a JDBC transaction?
  24. What is JDBC Savepoint? How to use it?
  25. What is JDBC DataSource ?
  26. How to achieve JDBC Connection Pooling using JDBC DataSource and JNDI in Apache  Tomcat Server?
  27. What is Apache DBCP API?
  28. What is JDBC Connection isolation levels?
  29. What is “dirty read” in JDBC?
  30. What are the different types of locking in JDBC?
  31. What do you understand by DDL and DML statements?
  32. What is difference between java.util.Date and java.sql.Date?
  33. How to insert an image or raw data into database?
  34. What is phantom read and which isolation level prevents it?
  35. What is SQL Warning? How to retrieve SQL warnings in the JDBC program?
  36. How to invoke Oracle Stored Procedure with Database Objects as IN/OUT?
  37. When do we get java.sql.SQLException: No suitable driver found?
Note: Phantom read occurs where in a transaction same query executes second time, and the second result set includes rows that weren’t visible in the first result set. This situation is caused by another transaction inserting new rows between the execution of the two queries.

Thank you visitor…! 🙂 www.ease2code.com

Speak Your Mind