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

oracle sql语句
表A   字段  a  b   c   d   e
在查询出d字段为空时 如果满足条件  同时把a、b字段的值插入到d、e字段      
a对应d   b对应e字段
sql语句能实现吗?求高手

表A   字段  a  b   c   d   e
查询如果b为空  同时插入一个值
sql语句能实现吗?求高手
SQL Oracle

------解决方案--------------------
你的需求描述不清楚,是要用更新吗?

update table
   set d= a,e = b
    where d is null;

------解决方案--------------------
update a set d=a,e=b where d is null;