查询含有clob字段表&查询没有主键表的sql语句

---------------------查询含有clob字段表的sql语句
select * from user_tab_cols where data_type in ('BLOB','CLOB')


-------------快捷查询表空间
SELECT 'create tablespace '||tablespace_name ||' DATAFILE ''d:\data\'||tablespace_name||'.BDF'' SIZE 100M;'  FROM dba_tablespaces
WHERE tablespace_name='BDF_BASE'



----------------------查询没有主键表的sql语句
select * from user_tables a where not exists (
select 1 from user_constraints b WHERE a.TABLE_NAME=b.table_name
AND b.constraint_type='P')


猜你喜欢

转载自qi20088.iteye.com/blog/1825368