where (pl/sql) 中的多个条件
Multiple conditions in where (pl/sql)
我有这些 table_1:
A |B |C |D
19 | | |
238| |1 |AS
45 |23| |
196| | |
我需要删除字段 B 、 C 和 D 为空的记录。
可以吗?
Delete From table_1 Where C is null and B is null and D is null;
但是如果我有另一个 table 有多个字段:A,B,C,D,E,F....Z,AA,AB.....BA...
在这种情况下最好的方法是什么?
您可以使用 COALESCE:
Delete From table_1
Where COALESCE(A,B,C,D,E,F,....,Z,AA,AB,.....,BA) is null;
我有这些 table_1:
A |B |C |D
19 | | |
238| |1 |AS
45 |23| |
196| | |
我需要删除字段 B 、 C 和 D 为空的记录。
可以吗?
Delete From table_1 Where C is null and B is null and D is null;
但是如果我有另一个 table 有多个字段:A,B,C,D,E,F....Z,AA,AB.....BA...
在这种情况下最好的方法是什么?
您可以使用 COALESCE:
Delete From table_1
Where COALESCE(A,B,C,D,E,F,....,Z,AA,AB,.....,BA) is null;