原文:在oracle中查询已知表名的表中所有字段名,每个字段是否是主键,是否是外键,是否为空的sql语句

查询表的所有列及其属性:select t. ,c.COMMENTS from user tab columns t,user col comments c where t.table name c.table name and t.column name c.column name and t.table name women 查找表的主键:select cu. from user cons co ...

2014-10-29 11:46 0 8749 推荐指数:

查看详情

Oracle已知字段名查询所在的

select table_name from user_tab_columns where column_name = '字段名'; 查询不出来注意: 1.大小写 2.对象类型 使用user_objects或者user_segments查看类型 3.用户权限 需要创建的用户 ...

Tue Sep 18 23:36:00 CST 2018 0 993
Oracle已知字段名查询所在的

select table_name from user_tab_columns where column_name = '字段名'; 这是网上查到的,地址如下:http://blog.163.com/pei_hua100/blog/static/80569759201272114619283 ...

Wed Aug 17 17:30:00 CST 2016 0 4501
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM