oracle并没有update from 这个写法。
所以在从一个表将数据更新到另外一个表时,无法使用update from写法,尤其是需要多行更新时,最好使用merge into。
merge into允许,将两个表基于某个或者某些字段进行比对,根据比对结果,match或者not match,而执行update或者insert甚至于delete操作。
示例:
merge into count_temp b using count_temp2 a on (a.count2=b.count2) when matched then update set a.count2=b.count2;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9606200/viewspace-1435678/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9606200/viewspace-1435678/
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)