"select * from user" .what are the steps to take for execution of query in JDBC?

Showing Answers 1 - 2 of 2 Answers

Karuna Rajesh

  • Oct 2nd, 2005
 

Statement stmt = con.createStatement();

ResultSet rs = stmt.executeQuery("select * from user");

  Was this answer useful?  Yes

ss

  • Nov 11th, 2005
 

in java program if we want execute a statment

1) load the driver by using Class.forname("driver")

2) get connection by using driverManager.getConnection("DataSource")

3) createStatement con.createStatement();

4) execute the query n get resultset.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions