1. A primary/unique key can be more than just one field and used to uniquely identify a row of a table .
2. A table can have only one primary key and it cannot be a null value.
However , a table can have more than one unique key and it can accept null values.
3. A primary key is a unique key by default.
Example :
Consider a table with fields...empid,name,passport No
Here we make empid as a primary key,through which we can identify a particular row.
Passport No. can be considered as a Unique key(which is unique always) but this can be empty as every employee need not hold a passport.
2. A table can have only one primary key and it cannot be a null value.
However , a table can have more than one unique key and it can accept null values.
3. A primary key is a unique key by default.
Example :
Consider a table with fields...empid,name,passport No
Here we make empid as a primary key,through which we can identify a particular row.
Passport No. can be considered as a Unique key(which is unique always) but this can be empty as every employee need not hold a passport.