Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
UNIQUE INDEX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
Author Message
srikanthmech

New User


Joined: 02 Aug 2005
Posts: 1

PostPosted: Thu Aug 18, 2005 7:28 pm    Post subject: UNIQUE INDEX
Reply with quote

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
View user's profile Send private message
References
ragshere

Active User


Joined: 20 Dec 2004
Posts: 72

PostPosted: Thu Aug 18, 2005 8:13 pm    Post subject: Re: UNIQUE INDEX
Reply with quote

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
View user's profile Send private message
hisabarish

New User


Joined: 19 Jul 2005
Posts: 4
Location: Bangalore

PostPosted: Fri Aug 19, 2005 10:51 am    Post subject: Re: UNIQUE INDEX
Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1