0
我想写一个更新程序PLSQL更新语句
哪种方法是最好的
1)方法1
if(condition)="P"
update table
set fields1
where field2 = "2" ;
else(condition)="U"
update table
set fields1
where field3 = "3" ;
2)方法2
case condition
when "p"
update table
set fields1
where field2 = "2" ;
when "u"
update table
set fields1
where field3 = "3" ;
遇到我应该使用是否有理由使用它,为什么另一个不是一个好的选择。
嗨..不会这个查询需要更多的时间,如果表是巨大的?因为每行都必须检查这些条件。 – Jeevi