import java.sql.*;
class game0501{
String url = "jdbc:derby:db;create=true";
String usr = "";
String pwd = "";
public static void main(String [] args) {
game0501 f=new game0501();
}
game0501(){
Connection dbx;
Statement stx;
ResultSet rsx;
int s;
s=0;
try {
dbx = DriverManager.getConnection(url, usr, pwd);
stx = dbx.createStatement();
rsx = stx.executeQuery("select count(*) from zgoogle");
rsx.next();
s = rsx.getInt(1);
System.out.println(s);
rsx.close();
stx.close();
dbx.close();
} catch (Exception ex) {ex.printStackTrace();}
}
}
最終更新:2011年03月29日 01:15