What is a primary key?

A primary key is a column whose values uniquely identify every row in a table. Primary key values can never be reused. If a row is deleted from the table, its primary key may not be assigned to any new rows in the future. To define a field as primary key, following conditions had to be met :
1. No two rows can have the same primary key value.
2. Every row must have a primary key value
3. Primary key field cannot be null
4. Values in primary key columns can never be modified or updated

Leave a Comment

Your email address will not be published. Required fields are marked *