class.forname("oracle.jdbc.driver.OracleDriver");//加载数据库驱动
String url="jdbc:oracle:thin:@localhost:1521:db_name";
String sql="CREATE TABLE table(filed1 varchar2(2),filed2 varchar2(2))";
Connection conn=DriverManager.getConnection(url,"scott","tiger");//建立数据库连接
if(!conn.isClose()){
Statement stmt = conn.createStatement();
stmt.executeUPDATE(sql); //建立一个表
}