Oracle: Finding Columns with only null values
- by Jorge Valois
I have a table with a lot of columns and a type column.
Some columns seem to be always empty for a specific type.
I want to create a view for each type and only show the relevant columns for each type. Working under the assumption that if a column has ONLY null values for a specific type, then that columns should not be part of the view, how can you find that out with queries?
Is there a
SELECT [columnName] FROM [table] WHERE [columnValues] ARE ALL [null]
I know I COMPLETELY made it all up above... I'm just trying to get the idea across.
Thanks in advance!