Most asked top Interview Questions and Answers | Online Test | Mock Test
Education platform for interview prep, online tests, tutorials, and live practice

Build skills with focused learning paths, mock tests, and interview-ready content.

WithoutBook brings subject-wise interview questions, online practice tests, tutorials, and comparison guides into one responsive learning workspace.

Search the library
Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: What is JDBC? Describe the steps needed to execute a SQL query using JDBC.
Answer: We can connect to databases from java using JDBC. It stands for Java DataBase Connectivity.
Here are the steps:
  1. Register the jdbc driver with the driver manager
  2. Establish jdbc connection
  3. Execute an sql statement
  4. Process the results
  5. Close the connection
Before doing these do import java.sql.*

JDBC is java based API for accessing data from the relational databases. JDBC provides a set of classes and interfaces for doing various database operations. The steps are:
  • Register/load the jdbc driver with the driver manager.
  • Establish the connection thru DriverManager.getConnection();
  • Fire a SQL thru conn.executeStatement();
  • Fetch the results in a result set.
  • Process the results.
  • Close statement/result set and connection object.

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library
Is it helpful? Yes No

Most helpful rated by users:

©2026 WithoutBook