原文:sqlserver如何查询一个表的主键都是哪些表的外键

select object name a.parent object id tables from sys.foreign keysa where a.referenced object id object id 表名 ...

2016-07-26 12:22 1 7828 推荐指数:

查看详情

Oracle查询主键

项目中用到的一些Sql(oracle下的)总结: 1、查找的所有索引(包括索引名,类型,构成列) 1 select t.*,i.index_type from user_ind_columns t,user_indexes i where t.index_name ...

Mon Sep 18 21:06:00 CST 2017 0 1260
必须 是另一个主键 么?

不是 1.可以是另一个主键 2.或者是另一个的唯一值。就是的字段在另一个中不能重复且字段类型和长度必须相同 ...

Sun Dec 06 05:09:00 CST 2020 0 1252
ORACLE 查询所有主键等信息

Select a.Owner 拥有者,    a.Table_Name ,    c.Column_Name 列,    b.Owner 主键拥有者,    b.Table_Name 主键,    d.Column_Name 主键列,    c.Constraint_Name ...

Tue Jun 11 05:37:00 CST 2019 0 3426
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM