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

Can we create more then one primary key in a table


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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: 677
Location: NJ

PostPosted: Thu Nov 03, 2005 2:41 pm
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 All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts count contained values of several col... DB2 5
No new posts To join 2 tables and to join 3rd tabl... DB2 8
No new posts Create a specific record/file based o... SYNCSORT 8
No new posts Extract ISPF table column headings CLIST & REXX 2
No new posts Create a FTP record with help of SYNC... SYNCSORT 3
Search our Forums:


Back to Top