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
 

 

Explain about On Delete Cascade, Restrict and SET to Null

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
Ananya

New User


Joined: 26 Feb 2004
Posts: 19
Location: Chennai

PostPosted: Sat Feb 28, 2004 3:07 pm    Post subject: Explain about On Delete Cascade, Restrict and SET to Null
Reply with quote




Dear All,


1. Can anyone EXPLAIN me with an EXAMPLE, What are ..

a. ON DELETE CASCADE

b. ON DELETE RESTRICT

c. ON DELETE SET TO NULL.

2. Also tell me What is the Action/Reaction to Parnt & Child Tables when an Delete is done on either of these tables.

All your views will be appreciated.

Thanks in advance.

Cheers

-Ananya
Back to top
View user's profile Send private message

anuradha

Active User


Joined: 06 Jan 2004
Posts: 247
Location: Hyderabad

PostPosted: Mon Mar 01, 2004 5:23 pm    Post subject: DELETE RULE
Reply with quote

hi ananya,

Actually this DELETE rule is referential constraint.

The DELETE rule defines the effects that deleting a row in the referenced table has on the referencing table The DELETE rule is also used when column attributes are defined.


No DELETE rule: deleting a row in the referenced table will fail if matching rows exist.
ON DELETE CASCADE: if a row in the referenced table is deleted, all of the matching rows are deleted.
ON DELETE RESTRICT: deleting a row in the referenced table will fails if matching rows exist.
ON DELETE SET NULL: if a row in the referenced table is deleted, a NULL value is assigned to each referencing column of every matching row.
None of these referencing tables may be a NOT NULL column.


hope this helps.others can add.

THANKS AND REGARDS
ANU
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 pm
No new posts Delete record or Reset RC code using ... mpawan Compuware & Other Tools 4 Tue Jul 26, 2016 3:52 pm


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