java 修改sql数据库的语句是什么啊??

比如说:旧记录更换为新纪录,该怎么写??

update 表名 set 列名=更新值 where 查询条件
例如:把Employee表中的名为张三的EmployeeID的值更改为1,就要写到

update Employee set EmployeeID=1 where Name='张三'
温馨提示:内容为网友见解,仅供参考
第1个回答  2008-05-18
import java.sql.*;

public class DBUtil{
public static void main(String[] args)throws Exception{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:jsql");
PreparedStatement pst=con.prepareStatement("insert iotn jobs ('dddddd','1','1')");
pst.executeUpdate();
pst.close();
con.close();
}
}

参考资料:注意配制数据库

第2个回答  2008-05-18
。。。update
第3个回答  2008-05-18
update table set 列名=更新值 [where 条件] 感觉楼上说对了
有外联另外说...
第4个回答  2008-05-18
update table set 列名=更新值 [where 条件]本回答被提问者采纳
相似回答