Retrieve data using JDBC

author-image
CIOL Bureau
Updated On
New Update

Use execute() method of the statement object to retrieve data from a table in JDBC. This sample code first makes a JDBC connection to the database and then retrieves all the records of the table and stores it. It uses ResultSet object to store the data. Then content of the ResultSet is printed to the console.

Advertisment

Click here for more !

tech-news