Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 load and delete table through JCL wit... ram_vizag JCL & VSAM 9 Thu Feb 01, 2018 12:47 am
No new posts Change NULL indicator in UNLOAD utility Khadhar Basha DB2 2 Fri Dec 15, 2017 3:01 pm
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts Delete IMS remote transaction when MO... Sam Singh IMS DB/DC 0 Wed Aug 23, 2017 9:12 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us