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

Primary-Foreign Key relationship


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ppandey07

New User


Joined: 27 Nov 2008
Posts: 51
Location: Delhi, India

PostPosted: Tue Jul 12, 2011 9:46 am
Reply with quote

Hi

I have 2 db2 tables. 1st having Roll no. and Name and 2nd having Roll no., marks.
Can the Roll No. in the 2nd table be used as a primary key and a foreign key with it's parent key being Roll no. on the 1st table?
If yes, will it have any implications while we're inserting, deleting or updating any of the tables?
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Tue Jul 12, 2011 11:21 am
Reply with quote

yes
The implications are the same as any other Foreign key.
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 Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
No new posts Cobol prog to put an indicator on the... JCL & VSAM 1
No new posts Can we Insert duplicates in Primary U... DB2 2
No new posts Foreign character look different in m... COBOL Programming 3
Search our Forums:

Back to Top