首页 > 数据库 >Oracle 查询表字段相关信息

Oracle 查询表字段相关信息

时间:2022-10-26 17:38:42浏览次数:44  
标签:NAME t2 表字 t1 xx Oracle TABLE 查询 select

-- 查询表的所有字段
select *
from user_tab_comments
where TABLE_NAME = 'xx';
select *
from user_col_comments
where TABLE_NAME = 'xx';
select *
from ALL_TAB_COLUMNS
where TABLE_NAME = 'xx';


select  t1.TABLE_NAME,t1.COLUMN_NAME,t1.COMMENTS,t2.DATA_TYPE,t2.DATA_LENGTH
      from  user_col_comments t1
left join ALL_TAB_COLUMNS t2
on t1.TABLE_NAME = t2.TABLE_NAME and t1.COLUMN_NAME=t2.COLUMN_NAME
where t1.TABLE_NAME='xx'
order by t2.column_id;


 

标签:NAME,t2,表字,t1,xx,Oracle,TABLE,查询,select
From: https://www.cnblogs.com/YinXuanZhiZhi9/p/16829208.html

相关文章