public static void main(String [] args) {
Connection con?
Statement stmt?
String url?
String sql?
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver")?
} catch (ClassNotFoundException ce) {
System.out.println(ce)?
}
try {
url = "jdbc:odbc:test"?
con = DriverManager.getConnection(url)?
sql = "Update friends set address="'青島"' where “+ "rtrim(name) like "'李四"'? "?
System.out.println("")?
stmt = con.createStatement()?
stmt.executeUpdate(sql)?
stmt.close()?
con.close()?
System.out.println("李四的記錄已更新")?
} catch (SQLException ce) {
System.out.println(ce)?
}
}
}


1.讀萬卷書
2.行千里路
3.閱人無數(shù)