0% found this document useful (0 votes)
14 views1 page

JDBC Initialization

Uploaded by

elangovan2006m
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views1 page

JDBC Initialization

Uploaded by

elangovan2006m
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

1. Class.forName(“oracle.jdbc.driver.

Driver”);
2. Connection con =
DriverManager.getConnection("jdbc:mysql://localhost:8080/databaseName",username,pas
sword);
3. Statement st = con.createStatement();
4. ResultSet resultset=Statement.executeQuery("SQL query");
5. while(resultset.next()){
String data=resultset.getString("Column name");
System.out.println();
}

You might also like