QuesHub > 多个 > 能有 > 一键 > ASK DETAIL

Is a foreign key always unique?

Ava Roberts | 2023-05-05 16:08:38 | page views:1422
I'll answer
Earn 20 gold coins for an accepted answer.20 Earn 20 gold coins for an accepted answer.
40more

Harper Wright

Studied at University of Chicago, Lives in Chicago, IL
By the SQL standard, a foreign key must reference either the primary key or a unique key of the parent table. If the primary key has multiple columns, the foreign key must have the same number and order of columns. Therefore the foreign key references a unique row in the parent table; there can be no duplicates.
2023-05-15 16:08:38

Charlotte Lee

QuesHub.com delivers expert answers and knowledge to you.
By the SQL standard, a foreign key must reference either the primary key or a unique key of the parent table. If the primary key has multiple columns, the foreign key must have the same number and order of columns. Therefore the foreign key references a unique row in the parent table; there can be no duplicates.
ask:3,asku:1,askr:137,askz:21,askd:152,RedisW:0askR:3,askD:0 mz:hit,askU:0,askT:0askA:4