Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Confusion b/w index and subscript Deepak kumar25 Mainframe Interview Questions 7 Thu Aug 31, 2017 6:50 am
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
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

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us