JDBC
1 . DriverManager
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
2 . Connection
Connection conn=DriverManager.getConnection(url,user,password);
3 . Statement (execute SQL)
Statement stmt=conn.createStatement();
String sql="select * from user where userName=? and password=?";
PreparedStatement pstmt=Conn.prepareStatement(sql);
pstmt.setString(1,"admin");
pstmt.setString(2,"liubin");
关于安装: