Java通过JDBC连接数据库。
One: 加载数据库驱动。
Two: 获得连接。
Three: 获得陈述。
Four: 执行T - SQL语句。
Five: 获得结果集。
Six: 完成相应操作。
SQL Server的url为: "jdbc:sqlserver://localhost:1433;DatabaseName=你的数据库名";
MySQL的url为: "jdbc:mysql://localhost:3306/jspstudy?user=root&password=500158";
ORACLE的url为: "jdbc:oracle:thin:@localhost:1521:BJPOWERNODE"; // BJPOWERNODE为数据库名称