Class.forName(“oracle.jdbc.driver.OracleDriver”);
Connection conn=DriverManager.getConnection( url , username , password );
Statement stmt=conn.createStatement();
String str=”select * from [table]”;
ResultSet rs=stmt.executeQuery(str);
While(rs.next())
{
……………………
}
rs.close();
stmt.close();
conn.close();
时间: 2024-10-13 03:13:56