Cillín
Cillín

Reputation: 187

Oracle sql referencing

Can, for example,

table1.columnA reference table2.columnA

if table2.columnA is not a primary key? Or is referencing strictly for primary keys?

Upvotes: 0

Views: 30

Answers (1)

Matthew McPeak
Matthew McPeak

Reputation: 17934

There must be a unique constraint on table2.columnA in order to reference it in a FOREIGN KEY constraint. But it need not be the primary key.

Upvotes: 3

Related Questions