日期:2014-05-17  浏览次数:21027 次

update没有where语句不执行
在plsql中执行update tb_cons_pqamt  t  set  t.cons_name='1' 执行后没有反应 执行update tb_cons_pqamt  t  set  t.cons_name='1'  where 1=1 就成功更新,困惑住我了,有谁知道是怎么回事吗。以前没有遇到过啊。
plsql oracle

------解决方案--------------------
引用:
在plsql中执行update tb_cons_pqamt  t  set  t.cons_name='1' 执行后没有反应 执行update tb_cons_pqamt  t  set  t.cons_name='1'  where 1=1 就成功更新,困惑住我了,有谁知道是怎么回事吗。以前没有遇到过啊。


你看一下更新返回的结果集对不对,你首先select * from tb_cons_pqamt where cons_name='1' 看能否查询到记录,如果能查询到肯定就能更新了