There is two difference between them. 1. The not null constraint is by default added to primary key, it means, primary key attribute cannot accept null values, whereas, the attribute declared as unique can accept null values. It is the major difference between the two. 2. Secondly, we can have only one primary key in a relation, whereas, multiple attributes can be declared unique at the same time.
what is difference between primary key and secondary key
Primary memory can be directly accessed by the CPU but secondary memory can not be accessed directly and Secondary memory is first transferred to primary memory and then primary memory to the CPU
Primary key is always unique, primary key is the field you sort on first and the secondary key is the field you sort on second.......!!!!!!!
The primary key is the field containing unique values that aid in database operations. The secondary key is used in addition or as an alternate to the primary key. Both are candidate keys, it's just that one was chosen to be primary.
primary key is the unique constraint on the table,which identify each tuple uniquely where as secondary key is also constaint on table but it can identify more than one reconds in table...
3 Foreign key
a secondary key
Candidate Key is used to uniquely identify the records of a table. An attribute becomes a Primary Key, if all the other candidate keys lose race for being qualified as Primary Key.
There are no "primary and secondary keys" in c and c plus plus.
secondary index is a key which is created other than primary key, to speed up processing.
Primary key is a type of unique index with no null constraint on the columns involved. There can only be one Primary key whereas you can create other unique indexes on the table.
A primary key is a special case of unique keys which doesnt accept duplicates. The difference between unique keys is that "NOT NULL" constraint is not automatically enforced, while for primary keys it is mandatoryUnique keys and primary keys can be referenced by foreign keys
primary is a key that allows us to unlock mobaj31 and also it is used to open a bra when to open girls nitche.....
There are two types of keys in any database; composite and primary keys. Composite key differs from primary key in that it contains more than one column while primary key is composed of only one field and cannot have a null value.