tags:

views:

18

answers:

1

can we define a primary key in a table as a foreign key in that table . I mean,

PRIMARY KEY(ssn),
 FOREIGN KEY (ssn) REFERENCES Cust(cust_ssn)

And If we have a table that has some parameters that refers to some other table parameters and to some other 3rd table too. Then Do we need to define those parameters as foreign key referencing to both the tables or Just only one.

+1  A: 

Yes. Any field or combination of fields can be a foreign key.

VoteyDisciple
Foreign keys are just costraints. A foreign key means that its value must be present in another table's column. +1 to VoteyDisciple
djechelon