How can I find columns which have non-null values?
Posted
by
aartist
on Stack Overflow
See other posts from Stack Overflow
or by aartist
Published on 2011-04-05T17:09:31Z
Indexed on
2012/09/18
9:38 UTC
Read the original article
Hit count: 140
I have many columns in oracle database and some new are added with values. I like to find out which columns have values other than 0 or null. So I am looking for column names for which some sort of useful values exists at least in one row.
How do I do this?
Update: This sounds very close. How do I modify this to suit my needs?
select column_name, nullable, num_distinct, num_nulls
from all_tab_columns
where table_name = 'SOME_TABLE'
© Stack Overflow or respective owner