RATE THIS ANSWER
+1
Click to Vote:
1
0
The following query will give you that information for a specific table:
select column_name,data_type,data_length,data_precision,nullable,column_id
from all_tab_columns atc, all_tables at
where atc.table_name = at.table_name
and atc.owner = at.owner
and at.owner = '&owner'
and at.table_name = '&table'
and atc.num_nulls < at.num_rows
order by atc.column_id;
(I tested it on Oracle 8i, thereby I could not use the ANSI join syntax)
I think you can achieve the same without joining the all_tables table, this way:
select column_name,data_type,data_length,data_precision,nullable,column_id
from all_Tab_columns
where owner = '&owner'
and table_name = '&table'
and num_distinct != 0
order by column_id;
Please note that tables need to be analyzed in order to get accurate results.
Last Answered:
Dec 10 2008 11:34 PM GMT by Carlosdl 
29820 pts.