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
 

 

reg deleting an entry from table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: reg deleting an entry from table
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

Site Director


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

PostPosted: Wed Sep 22, 2010 9:43 am    Post subject:
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    Post subject:
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    Post subject:
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    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 how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
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 Automation of data entry using Rexx i... zingy.rajeev CLIST & REXX 4 Mon Aug 22, 2016 4:13 pm


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