IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

UNIQUE INDEX


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Cobol file using index COBOL Programming 2
No new posts DL/I status code AK for GU call using... IMS DB/DC 1
No new posts Any JCL or VSAM Utility to get number... JCL & VSAM 1
No new posts Add column to existing records using ... JCL & VSAM 2
No new posts choice of clustering index DB2 3
Search our Forums:

Back to Top