有许多slightly similar个问题,但没有一个能准确地解决这个问题."Find All Rows With Null Value(s) in Any Column"是我能找到的最接近的一个,它为SQL Server提供了一个答案,但我正在寻找一种在PostgreSQL中实现这一点的方法.
如何仅 Select 在any列中有空值的行?
我可以很容易地得到所有的列名:
select column_name from information_schema.columns where table_name = 'A';
但目前尚不清楚如何判断多个列名中的空值.显然这行不通:
select* from A where (
select column_name from information_schema.columns where table_name = 'A';
) IS NULL;
而searching没有发现任何有用的东西.