sqlplus 如何查询 表结构

longtenggdf 2011-06-29 10:03:51
询用sqlplus如何查询表结构信息,如,字段名,类型,大小,注释...。通过pl/sql工具是可以查看,但我想知道在sqlplus上是查哪张系统表或视图。谢谢!
...全文
1999 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhuxu1234 2011-07-06
  • 打赏
  • 举报
回复
desc table_name 即可
ChiChengIT 2011-07-06
  • 打赏
  • 举报
回复
希望对你有帮助:
查看某表的大小
SQL>select sum(bytes)/(1024*1024) as "size(M)" from user_segments
where segment_name=upper('&table_name');

查看索引的大小
SQL>select sum(bytes)/(1024*1024) as "size(M)" from user_segments
where segment_name=upper('&index_name');

select t.tablespace_name, round(sum(bytes/(1024*1024)),0) ts_size
from dba_tablespaces t, dba_data_files d
where t.tablespace_name = d.tablespace_name
group by t.tablespace_name;

2、查看表空间物理文件的名称及大小

select tablespace_name, file_id, file_name,
round(bytes/(1024*1024),0) total_space
from dba_data_files
order by tablespace_name;
Rotel-刘志东 2011-07-06
  • 打赏
  • 举报
回复
desc 表名
huangfanno1 2011-07-06
  • 打赏
  • 举报
回复
desc table_name
zehui11 2011-07-06
  • 打赏
  • 举报
回复
describe或者desc
yuzhong218 2011-07-06
  • 打赏
  • 举报
回复
我也学习了,谢谢。
iqlife 2011-06-29
  • 打赏
  • 举报
回复
DESC 表名
秋雨飘落 2011-06-29
  • 打赏
  • 举报
回复
desc table_name;
表列的注释:user_col_comments;
表列的数据类型,精度:user_tab_columns
小青蛙 2011-06-29
  • 打赏
  • 举报
回复
又学到东西了,谢谢
jimmylin040 2011-06-29
  • 打赏
  • 举报
回复
100分。。。我也来沾点光吧 >_<
304的的哥 2011-06-29
  • 打赏
  • 举报
回复
desc table_name;
表列的注释:user_col_comments;
表列的数据类型,精度:user_tab_columns
longtenggdf 2011-06-29
  • 打赏
  • 举报
回复
谢谢大家。
gguxxing008 2011-06-29
  • 打赏
  • 举报
回复
desc your_table
select * from all_tables;
select * from all_tab_columns;
select * from all_tab_comments;
yejihui9527 2011-06-29
  • 打赏
  • 举报
回复
DESC 表名
老黎 2011-06-29
  • 打赏
  • 举报
回复
desc your_table
select * from all_tables;
select * from all_tab_columns;
select * from all_tab_comments;

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧