The primary key is the columns used to uniquely identify each row of a table.A table can have only one primary key. It can not accept the duplicate and null values.
Foreign keys is a field in database table that is primary key in another table. It can accept multiple null and duplicate values.
Unique key is a one or more column that must be unique for each row of the table.It is similar to primary key. Primary key column will not accept a null. Whereas the unique key column will accept a null values.