Oracle 查询表字段相关信息

复制代码
-- 查询表的所有字段
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;


复制代码

 

posted @   D·Felix  阅读(73)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· DeepSeek 开源周回顾「GitHub 热点速览」
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
点击右上角即可分享
微信分享提示
۵
۵
۵
۵
۵
۵
۵
۵
۵
۵
۵
۵
۵
۵