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
 

 

Primary-Foreign Key relationship

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Primary-Foreign Key relationship
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    Post subject:
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    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 SFTP to primary and secondary servers mallik4u JCL & VSAM 4 Tue Jun 07, 2016 12:52 pm
No new posts What's the relationship between DB2 t... dejunzhu DB2 7 Fri Aug 22, 2014 8:28 am
No new posts Count unique values in a column based... Deepakgoyal2005 JCL & VSAM 4 Fri Jul 25, 2014 5:49 pm
No new posts Skipping secondary record when primar... magesh23586 DFSORT/ICETOOL 8 Sat Dec 07, 2013 11:41 pm
No new posts Enforcing Foreign Key gylbharat DB2 10 Wed Apr 17, 2013 9:39 pm


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