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.阅人无数