我需要在过程中显示一个具有空值列名称的列。 每一个帮助都将受到高度赞赏。
Procedure ** IS
result varchar2(100);
cursor a
IS
select
A,
B,
C,
CASE B is null then 'B' else '' end result
from table
where A is null or B is null or C is null
Begin
........
END;
如果列A和C具有特定记录的空值,我需要在结果变量中包含。
例外结果
A | B | C | Result
-- | ----| ----| -----
1 | null| 1 | B
null| 2 | null| A C
答案 0 :(得分:0)
DECODE可用于显示col A和C是否具有空值a:
DECODE(A, NULL, DECODE(C, NULL, 'A and C are NULL', ''), '')