Advertisements
Advertisements
प्रश्न
What is the importance of primary key in a table? Explain with suitable example.
स्पष्ट करा
Advertisements
उत्तर
Importance of a primary key
- It uniquely identifies every row in a table.
- It prevents duplicate values and maintains data integrity.
- It does not allow
NULLvalues. - It helps establish relationships between tables.
- It makes searching and referencing records easier.
Example: In a Student table, AdNo can be the primary key because every student has a unique admission number. Thus, the record with AdNo = 101 can be identified without confusion.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
