Creating Primary Key while creating DB2 Table How to define a Primary Key while creating a DB2 table? Generally when we create a DB2 table, we create the primary key using the same query. You can use the following query to do this. Table_Name is the name of the table Column_One and Column_two are the columns in the table An example is shown below
Emp_Number CHAR(10) NOT NULL WITH DEFAULT, Emp_Salary DECIMAL(10,0) NOT NULL WITH DEFAULT, Emp_Sec_code SMALLINT NOT NULL WITH DEFAULT,
; ; ; ;