sql - How to select all possible values of columns from all tables? -


select pom.table_name, pom.column_name all_tab_columns pom  pom.column_name like'%status%' 

i want see possible values in columns on list(in 1 row if possible). how can modify select it?

i want soemthing this

 table_name | column_name |values  -----------| ----------- | -------  car        | color       | red,green  

you can use below query requirement. fetched distinct column values table. can used table having limited number of distinct values have used listagg function.

select pom.table_name, pom.column_name,        xmltype(dbms_xmlgen.getxml('select listagg(column_name,'','') within group (order column_name) val                                     (select distinct '|| pom.column_name ||' column_name                                          '||pom.owner||'.'||pom.table_name||')')               ).extract('/rowset/row/val/text()').getstringval() val   all_tab_columns pom  pom.column_name like'%status%'; 

Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -