32.10. constraint_column_usage

視圖 constraint_column_usage 標識在當前數據庫 中使用了某種約束的所有字段。只有那些屬于當前用戶的表中的約束才會 被顯示出來。對于檢查約束,這個視圖標識用在檢查表達式裡的字段。 對于外鍵約束,這個視圖標識外鍵引用的字段。對于主鍵約束,這個視圖 標識被約束的字段。

Table 32-8. constraint_column_usage 字段

名字數據類型描述
table_catalogsql_identifier 被某個(些)約束使用的字段所在的表所在的數據庫(總是當前數據庫)
table_schemasql_identifier 被某個(些)約束使用的字段所在的表所在的模式名字
table_namesql_identifier 被某個(些)約束使用的字段所在的表的名字
column_namesql_identifier 被某個(些)約束使用的字段的名字
constraint_catalogsql_identifier包含該約束的數據庫名字(總是當前數據庫)
constraint_schemasql_identifier包含該約束的模式名字
constraint_namesql_identifier約束的名字