1 Answers
Primary Key vs Unique Key in IMS
In IMS, a primary key is a field or set of fields that uniquely identifies a record in a database. It is used to enforce entity integrity, meaning no two records can have the same primary key value. On the other hand, a unique key is a constraint that ensures the values in a column (or a combination of columns) are unique across all records in a table, but it may allow null values.
The main difference between a primary key and a unique key is that a primary key cannot contain null values and there can be only one primary key per table, whereas a unique key can contain null values and multiple unique keys can be defined for a table.
Please login or Register to submit your answer