
What are the steps required to execute a query in JDBC?


Hi friends,
The steps requires to execute a query in JDBC.
1 : First of all, we need to create an instance of a JDBC driver or load JDBC drivers.
2 : In the second step, we need to register the driver with DriverManager class.
3 : In this step, open the connection.
4 : With the help of this connection , creates a statement object.
5 : Execute the SQL queries.
6 : Close connection.
Thanks.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.