我有一个有50列的tableA。其中5个不为空,其他45个可以为空。现在。增加了第51列的状态。
当col6-col50为空时,我想将记录标记为“失败”状态。
col1-col5始终填充。但是让我们假设from col6-col50都是空值,然后将记录标记为状态失败。
好的,我知道这条路很长。
update ..
...
where (col6 is null and col7 is null and.....)有没有其他更短更有效的方法?谢谢
发布于 2011-10-07 06:36:54
好不到哪里去,但是
update ..
...
where COALESCE(
col6,
col7,
...) IS NULLhttps://stackoverflow.com/questions/7681193
复制相似问题