This Java code connects to an Oracle database, inserts user data into a table using a prepared statement, and then retrieves and prints the data. It establishes a connection to the database, inserts the values "Rohan" and "Rai" into the "std" table using a prepared statement, and then executes a query to select all data from the "std" table and print the results.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
42 views1 page
Import Public Class Public Static Void Try
This Java code connects to an Oracle database, inserts user data into a table using a prepared statement, and then retrieves and prints the data. It establishes a connection to the database, inserts the values "Rohan" and "Rai" into the "std" table using a prepared statement, and then executes a query to select all data from the "std" table and print the results.
Name: Dipak Munde Roll No: TE21261 A4: Write A Program To Insert and Retrieve The Data From The Database Using JDBC. Program: // Program To Insert Data Into Database