---
title: "What are the steps in the JDBC connection?"  
description: "What are the steps in the JDBC connection?"  
author: "Sumit Kesarwani"  
published: 2014-08-26  
updated: 2020-09-17  
canonical: https://www.mindstick.com/interview/2026/what-are-the-steps-in-the-jdbc-connection  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# What are the steps in the JDBC connection?

While making a JDBC connection we go through the following steps :

**Step 1 :** Register the database driver by using :

Class.forName(\" driver classs for that specific database\" );

**Step 2 :** Now create a database connection using :

Connection con = DriverManager.getConnection(url,username,password);

**Step 3:** Now Create a query using :

Statement stmt = Connection.Statement(\"select * from TABLE NAME\");

**Step 4 :** Exceute the query :

stmt.exceuteUpdate();

## Answers

### Answer by Sumit Kesarwani

While making a JDBC connection we go through the following steps :

**Step 1 :** Register the database driver by using :

Class.forName(\" driver classs for that specific database\" );

**Step 2 :** Now create a database connection using :

Connection con = DriverManager.getConnection(url,username,password);

**Step 3:** Now Create a query using :

Statement stmt = Connection.Statement(\"select * from TABLE NAME\");

**Step 4 :** Exceute the query :

stmt.exceuteUpdate();


---

Original Source: https://www.mindstick.com/interview/2026/what-are-the-steps-in-the-jdbc-connection

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
