2021
01-27
01-27
PostgreSQL 查看表的主外键等约束关系详解
我就废话不多说了,大家还是直接看代码吧~SELECTtc.constraint_name,tc.table_name,kcu.column_name,ccu.table_nameASforeign_table_name,ccu.column_nameASforeign_column_name,tc.is_deferrable,tc.initially_deferredFROMinformation_schema.table_constraintsAStcJOINinformation_schema.key_column_usageASkcuONtc.constraint_name=kcu.constraint_nameJOINinformation_schema.cons...
继续阅读 >