数据库标准八步每一步中的作用

Class.forName("com.mysql.jdbc.Driver");  //加载jdbc驱动
con=DriverManager.getConnection(url,user,password); //建立连接
stmt=con.createStatement(); //创建语句执行者(stateMent用于执行不带参数的简单sql语句,PreparedStatement用于执行带参数的预编译sql语句能够预防sql注入,CallableStatement提供了一种标准形式的调用存储过程的方法)
stmt.execute(“sql语句”); 
rs=stmt.executeQuery("sql查询语句"); //结果集
关闭close()
原文地址:https://www.cnblogs.com/albertshine/p/13254804.html