SQL实现查看表结构以及表注释(comments) |
您所在的位置:网站首页 › MySQL语句查看表结构 › SQL实现查看表结构以及表注释(comments) |
查看表结构: 看字段名与数据类型 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') ; |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |