能做到吗,好像java里获取不了这些信息吧。

解决方案 »

  1.   

    跟是不是java没关系,数据库一般要约束关系也发放到某张系统表里的,你查系统表就能得到.
      

  2.   

    新手,请问在哪里查看库中所有表的外键? 
    http://community.csdn.net/Expert/topic/3337/3337947.xml?temp=.13435从那个表中可以取出某表的主键字段,外键及相关联的表名等之类的信息?
    http://community.csdn.net/Expert/topic/3594/3594991.xml?temp=.9193994
      

  3.   

    建议了解一下oracle的基本配置管理知识。
      

  4.   

    可以丛数据库字典的约束表(ALL_CONSTRAINTS)里查。
      

  5.   

    oracle数据库有表可以查询。然后使用java操作数据库查询即可。
      

  6.   

    //主键
    select owner,constraint_name,table_name from user_constraints where owner='用户名' and constraint_type='P' and table_name='表名';//外键
    select owner,constraint_name,table_name from user_constraints where owner='用户名' and constraint_type='R' and table_name='表名';