加载驱动
try{Class.forName("com.mysql.jdbc.Driver");}catch(Exception e){}
连接数据库
Connection getConnection(java.lang.String);抛出SQLException
con = DriverManager.getConnection(uri,user,password);
汉字
characterEncoding=UTF-8/gb2312
查询
Statement sql = con.createStatement();抛出SQLException
ResultSet rs = sql.executeQuery("select * from student");
关闭连接
con.close();
顺序查询
next()移到下一个数据行
控制游标
Statement stmt = con.createStatement(int type,int concurrency);
ResultSet re = stmt.executeQuery(sql语句);