ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# 34.33\. `referential_constraints` 视图`referential_constraints`包含当前数据库里的所有参考(外键)约束。 只有当前用户有权访问的引用表里的约束才显示(通过成为所有者或有某些权限,而不是`SELECT`)。 **Table 34-31\. `referential_constraints` 字段** | 名字 | 数据类型 | 描述 | | --- | --- | --- | | `constraint_catalog` | `sql_identifier` | 包含这个约束的数据库名字(总是当前数据库) | | `constraint_schema` | `sql_identifier` | 包含这个约束的模式名字 | | `constraint_name` | `sql_identifier` | 这个约束的名字 | | `unique_constraint_catalog` | `sql_identifier` | 包含该外键约束引用的唯一或者主键约束的数据库名称(总是当前数据库) | | `unique_constraint_schema` | `sql_identifier` | 该外键约束引用的唯一或者主键约束的模式的名称 | | `unique_constraint_name` | `sql_identifier` | 该外键约束引用的唯一或者主键约束的名称 | | `match_option` | `character_data` | 该外键约束的匹配选项:`FULL`,`PARTIAL`,或者`NONE`。 | | `update_rule` | `character_data` | 这个外键约束的更新规则:`CASCADE`, `SET NULL`, `SET DEFAULT`, `RESTRICT`或者`NO ACTION`。 | | `delete_rule` | `character_data` | 这个外键约束的删除规则`CASCADE`, `SET NULL`, `SET DEFAULT`, `RESTRICT`或者`NO ACTION`。 |