我想提出这样的结论:
column_name, constraint_name, constraint_type, referenced_table_name, referenced_column_name
我试图这样做。
SELECT col.column_name, cons.constraint_name, cons.constraint_type,col.referenced_table_name, col.referenced_column_name
FROM information_schema.table_constraints cons, information_schema.key_column_usage col
WHERE col.table_name = countries
AND cons.constraint_name = col.constraint_name
AND cons.table_name = col.table_name
但是,我错过一栏——名称......:
请帮助我