分类: Oracle
2010-08-23 16:50:44
//取得该用户下所有表的中文名称和英文名称
select t2.table_name,t2.comments from user_tables t1,user_tab_comments t2 where t1.table_name=t2.table_name;
TABLE_NAME COMMENTS
------------------------------ -----------------------------------------------
SYSUSER 用户表
//取得表sysuser中的英文字段名,中文字段名,字段类型,字段长度
select
t1.TABLE_NAME,t1.COLUMN_NAME,t2.COMMENTS,t1.DATA_TYPE,t1.DATA_LENGTH
from user_tab_columns t1, user_col_comments t2 where
t1.TABLE_NAME='SYSUSER' and t1.TABLE_NAME=t2.TABLE_NAME and
t1.COLUMN_NAME=t2.COLUMN_NAME;
TABLE_NAME COLUMN_NAME COMMENTS DATA_TYPE DATA_LENGTH
----------- ----------------------------------------------------------------------
SYSUSER SYSUSERID 用户ID VARCHAR2 50
SYSUSER SYSUSERNAME 用户名 VARCHAR2 50
SYSUSER SYSUSERPASSWORD 密码