查看表结构:
看字段名与数据类型
select * from cols WHERE TABLE_name=upper( 'table_name ')
查看主键:
select * from user_constraints where constraint_type= 'P '
and TABLE_name=upper( 'table_name ')
另外:
在SQLPLUS中,用 desc tablename
在PL/SQL工具中,可以通过视图user_tab_columns 查看
select * from user_tab_columns where table_name = upper('tablename')
查看备注:
--查看表的comment
select * from all_tab_comments where table_name= upper('tablename') ;
--查看列的comment
select * from all_col_comments where table_name=upper('tablename') ;
本文介绍如何在Oracle数据库中查看表结构、字段信息、主键及表与字段的备注说明。提供了使用SQL查询和PL/SQL Developer工具的方法。
679

被折叠的 条评论
为什么被折叠?



