Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在创建一个只包含其他三个表的主键的表。我也应该保留这个表的主键吗?
是的,它的主键应该由这三个外键组成。
create table foo ( pk_1 whatever_type not null references table_1 (pk_1), pk_2 whatever_type not null references table_2 (pk_2), pk_3 whatever_type not null references table_3 (pk_3), primary key (pk_1, pk_2, pk_3) );