razesh84
New User
Joined: 05 Apr 2010 Posts: 41 Location: Kolkata,India
|
|
|
|
Hi,
I was going thru DB2-730 study material where i found that in a DDL if some column is specified with primary key or unique constraint then DB2 creates an unique index on it automatically.
I was pretty sure that until & unless you define an unique index, uniqueness can not be achieved. Fortunately in my new shop i had authority to create test tables. I created tables in both ways [primary key & unique constraint]....ddl ran fine but coundnt find any index attached with the tables. when I try to insert records on it i'm getting the following error
Code: |
SQLCODE = -540, ERROR: THE DEFINITION OF TABLE RAJESH.EMP_TEST_CHK
IS INCOMPLETE BECAUSE IT LACKS A PRIMARY INDEX OR A REQUIRED UNIQUE
INDEX
|
So, i guess an unique index explicitly requires for DB2 z/os.
Is there any other similar variation for DB2 z/os version.can anyone share a link.
Thanks,
Rajesh |
|