当前位置: 代码迷 >> Oracle管理 >> update更新两条数据如何写呀
  详细解决方案

update更新两条数据如何写呀

热度:100   发布时间:2016-04-24 04:54:29.0
update更新两条数据怎么写呀
这么写对吗?update t_news set (f_newsname,f_newscontent)=('fengkai','fengkai') where f_id =10;
为什么总是出错。。
------最佳解决方案--------------------
update t_news set f_newsname='fengkai',f_newscontent='fengkai' where f_id =10;

------其他解决方案--------------------
update table001
set (col1,col2)=(select val1,val2 from dual)
where conditions
...
这样写是可以的
------其他解决方案--------------------
引用:
update table001
set (col1,col2)=(select val1,val2 from dual)
where conditions
...
这样写是可以的
可是dual是不是另一个表呢?没有的别的方法了吗
------其他解决方案--------------------
引用:
引用:update table001
set (col1,col2)=(select val1,val2 from dual)
where conditions
...
这样写是可以的可是dual是不是另一个表呢?没有的别的方法了吗

亲 ,你没用过oracle DB吗?
dual 是虚表可以随便用
  相关解决方案