View previous topic :: View next topic
|
Author |
Message |
srikanthmech
New User
Joined: 02 Aug 2005 Posts: 1
|
|
|
|
When we created a table without a unique index, we were not able to perform any operations on the table ( we were not able to view the table at all ). In this respect i would like to know why a unique index is compulsorily required while creating a table in DB2? |
|
Back to top |
|
|
ragshere
New User
Joined: 20 Dec 2004 Posts: 70
|
|
|
|
Hi srikanth,
If you create a table it is not mandatory to create a unique index.
But If the table contains Primary key, we must create the unique index.Otherwise the table definition is incomplete.
So you can not access the table.
I think you got me...Pls verify again and let me know..
Thanks
Rags |
|
Back to top |
|
|
hisabarish
New User
Joined: 19 Jul 2005 Posts: 4 Location: Bangalore
|
|
|
|
Exactly ragshere !,
If you create a table with primary key, then u should create a unique index on a particular column , other wise you can?t enter a values in that particular table i.e., with out entering in a table we never see the table records. I believe that with out creating a unique index on a primary key table,the
sqlcode of -803 will come. |
|
Back to top |
|
|
|