There are many slightly similar questions, but none solve precisely this problem. "Find All Rows With Null Value(s) in Any Column" is the closest one I could find and offers an answer for SQL Server, but I'm looking for a way to do this in PostgreSQL.
How can I select only the rows that have NULL values in any column?
I can get all the column names easily enough:
select column_name from information_schema.columns where table_name = 'A';
but it's unclear how to check multiple column names for NULL values. Obviously this won't work:
select* from A where (
select column_name from information_schema.columns where table_name = 'A';
) IS NULL;
And searching has not turned up anything useful.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…