1.

What is a primary key, candidate key & foreign key? ? ?

Answer» I dont know candidate key<br>A primary key must contain unique values. If the primary key consists of multiple columns, the combination of values in these columns must be unique.A primary key column cannot contain NULL values. It means that you have to declare the primary key column with the NOT NULL attribute. ...A table has only one primary key.Then FOREIGN KEY ConstraintSQL FOREIGN KEY ConstraintA FOREIGN KEY is a key used to link two tables together.A FOREIGN KEY is a field (or collection of fields) in one table that refers to the PRIMARY KEY in another table.The table containing the foreign key is called the child table, and the table containing the candidate key is called the referenced or parent table.


Discussion

No Comment Found