Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

select only columns that are not empty oracle sql

select COLUMN_NAME
from sys.all_tab_columns col
inner join sys.all_tables t on col.owner = t.owner 
                              and col.table_name = t.table_name
where 
col.table_name = 'REPLACE THIS WITH YOUR TABLE NAME'
AND NUM_DISTINCT > 0 
order by col.column_id;
 
PREVIOUS NEXT
Tagged: #select #columns #empty #oracle #sql
ADD COMMENT
Topic
Name
7+8 =