标签:
/*查询当前用户表信息/
select A.column_name 字段名,
A.data_type 数据类型,
A.data_length 长度,
A.data_precision 整数位,
A.Data_Scale 小数位,
A.nullable 允许空值,
A.Data_default 缺省值,
B.comments 备注
from user_tab_columns A, user_col_comments B
where A.Table_Name = B.Table_Name
and A.Column_Name = B.Column_Name
and A.Table_Name = ‘表名‘;
/*按照备注,查询当前用户全数据库表列/
SELECT * FROM USER_COL_COMMENTS COLS WHERE COLS.comments LIKE ‘%字段备注%‘;
/*查询当前用户所有视图/
select view_name from user_views;
/*查询当前用户所有表/
select table_name from user_tables;
/*查询当前用户所有触发器/
SELECT UT.trigger_name FROM USER_TRIGGERS UT;
/*查询当前用户所有存储过程/
SELECT UPRO.*
FROM USER_PROCEDURES UPRO
WHERE UPRO.object_type = ‘PROCEDURE‘;
/*查询当前用户所有索引/
select uindex.index_name--, uindex.*
from user_indexes uindex
where uindex.index_type = ‘NORMAL‘
ORDER BY UINDEX.index_name;
标签:
原文地址:http://www.cnblogs.com/feng-blog/p/5336944.html