如何从每列中删除空值

Pot*_*ooo 1 sql database oracle plsql

如何从每列中删除空值这是示例

Column 1  Column 2 column 3  column 4 
a           1        null      null   
b           0        null      null   
c           1        null      null   
a           null      0        null   
b           null      1        null   
c           null      0        null   
a           null     null       1     
b           null     null       1     
c           null     null       0     
Run Code Online (Sandbox Code Playgroud)

我希望它看起来像这样

Column 1  Column 2 column 3  column 4  
a            1        0         1      
b            0        1         1      
c            1        0         0      
Run Code Online (Sandbox Code Playgroud)

这可能吗?您可能会看到图像前后的附加图片.

Gor*_*off 5

您可以使用聚合:

select col1, max(col2) as col2, max(col3) as col3, max(col4) as col4
from t
group by col1;
Run Code Online (Sandbox Code Playgroud)