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
 

 

Can we create more then one primary key in a table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
msnreddy

New User


Joined: 09 Jun 2004
Posts: 4
Location: Bangalore

PostPosted: Fri Jun 11, 2004 5:58 pm    Post subject: Can we create more then one primary key in a table
Reply with quote

Can anybody clarify my doubt? Can we create more then one primary key in a table? if create is there any limit? [/url]
Back to top
View user's profile Send private message

imvs

New User


Joined: 12 May 2004
Posts: 33

PostPosted: Fri Jun 11, 2004 7:11 pm    Post subject:
Reply with quote

msnreddy
A table cannot have more than one primary key , however
1) a primary key can have more than one column(max of 64 columns)
2) Another way to allow only unique values in a column is to create a table using the UNIQUE clause of the
CREATE TABLE or ALTER TABLE statement.
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Thu Nov 03, 2005 2:41 pm    Post subject: primary key
Reply with quote

hi frnd,
u cannot have more than one primary key in a single table. since that is the key value where v r going to refer the particular record.
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 SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts Command UNIQUE CONSTRAINT on any tabl... rohanthengal DB2 2 Thu Aug 18, 2016 3:48 pm


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