Can we able to get the queries for identifying unique column and not null column in schema.
Please refer below queries in oracle.
SELECT Table_name, index_name, num_rows, distinct_keys FROM dba_indexes WHERE table_owner = 'ownername' and uniqueness = 'NONUNIQUE' AND num_rows > 0 AND 100* ( num_rows - ( num_rows - distinct_keys ) ) / num_rows > 99 ;
SELECT t.table_name, c.column_name, t.num_rows, t.null_values FROM dba_tab_columns c, tab_tables t WHERE t.owner = 'ownername' and t.table_name=c.table_name and t.owner = c.owner and c.nullable='Y' and c.num_nulls=0;
Can we get same kind of queries in postgres?
Thanks