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

reg deleting an entry from table


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

Active User


Joined: 06 Sep 2007
Posts: 112
Location: India

PostPosted: Wed Sep 22, 2010 9:08 am
Reply with quote

I have 2 tables T1 and T2 , with the following fields and data.

T1 :
Eno : a1
Ename : Name1
Edept no : D1

T2 :
Dept no : D1
Dept name : Dept-one

My query is if i delete the D1 entry from T2 , what would happen to Edept no in T1 ?

Thanks
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Sep 22, 2010 9:43 am
Reply with quote

Hello,

If the 2 tables are unrelated, nothing would happen. . . One row would be deleted from the T2 table and the other table would remain unchanged.

I suspect there is more to your question, but you need to post table definitions for amore specific answer. . . Like is there a foreign key. . .
Back to top
View user's profile Send private message
Ambili S

Active User


Joined: 06 Sep 2007
Posts: 112
Location: India

PostPosted: Wed Sep 22, 2010 10:01 am
Reply with quote

what if there is a foreign key ?
Back to top
View user's profile Send private message
nareshkp

New User


Joined: 26 Sep 2007
Posts: 28
Location: Bangalore

PostPosted: Wed Sep 22, 2010 11:08 am
Reply with quote

Check this topic posted earlier in this forum.
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 Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Deleting a Tape file JCL & VSAM 14
Search our Forums:

Back to Top