can we define a primary key in a table as a foreign key in that table . I mean,
PRIMARY KEY(ssn),
FOREIGN KEY (ssn) R开发者_如何转开发EFERENCES 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.
Yes. Any field or combination of fields can be a foreign key.
精彩评论