Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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
View previous topic :: :: View next topic  
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

ragshere

New User


Joined: 20 Dec 2004
Posts: 70

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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts setting new limit Key values for inde... srilata83 DB2 1 Fri Feb 10, 2017 9:24 pm
No new posts Order BY AND Index Nileshkul DB2 2 Sat Dec 31, 2016 6:33 pm
No new posts Command UNIQUE CONSTRAINT on any tabl... rohanthengal DB2 2 Thu Aug 18, 2016 3:48 pm
No new posts Several errors during building altern... Andi1982 JCL & VSAM 11 Wed Jul 06, 2016 7:39 pm
No new posts Drop building Alternate Index for a p... bhavin.mehta JCL & VSAM 6 Mon Jul 04, 2016 3:47 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us