在线等!!如何通过主表及其主键查询到与之关联的表及关联字段?数据库为oracle

[复制链接]
查看11 | 回复2 | 2012-4-19 22:02:04 | 显示全部楼层 |阅读模式
select * from user_cons_columns a, user_constraints b where a.constraint_name = b.constraint_name and b.constraint_type = 'P' and b.table_name='待查的表名'...
回复

使用道具 举报

千问 | 2012-4-19 22:02:04 | 显示全部楼层
你用PL/SQL工具的话,输入表名,选中表名右键view,通过key,或者右下角直接view sql源代码也行的...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行