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