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
 

 

about delete from a parent table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
ranjita_biswal

New User


Joined: 23 Feb 2005
Posts: 5

PostPosted: Sun Jun 11, 2006 7:24 pm    Post subject: about delete from a parent table
Reply with quote

Hi,
Can we delete from a primary table if child tables are there?


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

prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Mon Jun 12, 2006 11:42 am    Post subject:
Reply with quote

It depends on the definition of the table, if restrict on delete is specified you can not but if cascade on delete or set null on delete is specified you can.
Back to top
View user's profile Send private message
ranjita_biswal

New User


Joined: 23 Feb 2005
Posts: 5

PostPosted: Mon Jun 12, 2006 7:01 pm    Post subject: Re: about delete from a parent table
Reply with quote

Hi,
Thanks.If nothing is specified on delete table what will happen?
Back to top
View user's profile Send private message
prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Tue Jun 13, 2006 11:32 am    Post subject:
Reply with quote

Default is cascade on delete I suppose
Back to top
View user's profile Send private message
murali.gummadi

New User


Joined: 17 May 2006
Posts: 5

PostPosted: Thu Jun 15, 2006 9:49 am    Post subject:
Reply with quote

Hi prasadvrk,

will u please clarify above answer is correct or not.
I think ON DELETE RESRTICT is the defauly.
But you have mentioned ON DELETE CASCADE is default.

Plz clarify this.

Correct me if i am wrong
Thanks & Regards
Murali
Back to top
View user's profile Send private message
prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Thu Jun 15, 2006 12:46 pm    Post subject:
Reply with quote

Hi Gummadi,

Iwas not sure(as I am not a DBA) that's why I said 'I suppose' . I concentrated on the first part of the question. Thanks for correcting me.
Back to top
View user's profile Send private message
vidhyanarayanan

New User


Joined: 23 Dec 2005
Posts: 52

PostPosted: Mon Jun 19, 2006 5:02 pm    Post subject:
Reply with quote

Hi,

If no Delete Rule definition is provided when the referential constraint is
defined, the ON DELETE NO ACTION definition is used as the default.
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 -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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 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 Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts Command UNIQUE CONSTRAINT on any tabl... rohanthengal DB2 2 Thu Aug 18, 2016 3:48 pm


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