Advertisements
Advertisements
प्रश्न
Differentiate between primary key and candidate key.
अंतर स्पष्ट करें
Advertisements
उत्तर
| Basis of Difference | Primary Key | Candidate Key |
|---|---|---|
| Meaning | The key selected to uniquely identify rows. | Any key eligible to be selected as the primary key. |
| Number in a table | Only one primary key is selected. | A table may have one or more candidate keys. |
| NULL values | Cannot contain NULL values. |
Candidate keys must also uniquely identify records and are normally not null. |
| Selection | Chosen from the candidate keys. | May or may not be selected as the primary key. |
| Example | AdNo selected as the key. |
Both AdNo and Name may be candidate keys. |
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
