标签:table user com desc sel tab constrain and pl/sql
查看表结构:
看字段名与数据类型
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) ;
标签:table user com desc sel tab constrain and pl/sql
原文地址:http://www.cnblogs.com/puffxia/p/7149206.html