1、加载驱动
class.for name( jdbc驱动类 )
2、建立连接
Connection con=DriverManager.getConection(url,,);
3、发送SQL语句
statement stmt=con.create.Statement();
ResultSet rs=stmt.executeQuery(" sql ");
4、接收返回值
while(rs.next()){
int x=rs.getInt("");
}
5、关闭
rs.close();
stmt.close();
con.close();