このSQLの最良の方法は何ですか?
A)
update tableName set
FieldA = (if FieldA = 1301 then null else FieldA endif),
FieldB = (if FieldB = 1301 then null else FieldB endif)
where Id = 707;
また
B)
update tableName set FieldA = null where Id= 707 and FieldA = 1301;
update tableName set FieldB = null where Id= 707 and FieldB = 1301;
モデル「A」では、機能して問題を解決するSQLが1つしかありません。モデル「B」には、「A」モデルと同じことを行いますが、より読みやすい2つのSQLがあります。
使用するのに最も適切なモデルは何ですか?