Question: steps required to execute a query in JDBC
What are the steps required to execute a query in JDBC?
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.