Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List out the table names having `clob` or `blob` or `lob` containing columns

Tags:

oracle

I have around 1000 table out of which I need to list out the table names having clob or blob or lob containing columns. Is there any query to list out the same from my schema?

like image 241
Nidheesh Avatar asked Jan 23 '14 09:01

Nidheesh


3 Answers

Try like this,

SELECT DISTINCT table_name 
FROM   user_tab_cols 
WHERE  data_Type IN ('CLOB', 'LOB', 'BLOB');
like image 165
Dba Avatar answered Nov 03 '22 01:11

Dba


Try this one:

SELECT OWNER, TABLE_NAME, COLUMN_NAME, DATA_TYPE
FROM ALL_TAB_COLUMNS 
WHERE DATA_TYPE IN ('CLOB', 'BLOB');
like image 22
Wernfried Domscheit Avatar answered Nov 03 '22 01:11

Wernfried Domscheit


I havent a database handy, but this should work:

select * from ALL_TAB_COLUMNS a where a.DATA_TYPE in ('CLOB','BLOB','NCLOB','BFILE');

(see: http://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_2094.htm and http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements001.htm)

like image 40
Flare Star Avatar answered Nov 03 '22 02:11

Flare Star