3 Top Rules to Become a Primary Key in DB2 Table

The primary key is part of the Table definition. There is one primary key is allowed for each table. And the columns contained in a primary key cannot have null values.

The primary key in DB2

A primary key constraint forbids duplicate values in one or more columns. A table with a primary key will be considered the parent table to a table with a foreign key, which becomes the dependent table.

3 Rules

  • Primary must be defined while creating Table
  • Only one Primary key is allowed
  • The primary key column must not allow null values

Note: A nullable column cannot be a part of a primary key.

Related

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.