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
 
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 How to delete large data. Mounika Nemani DB2 1 Wed Jun 13, 2018 1:58 pm
No new posts Extracting DDL for all list of intere... Ashishpanpaliya DB2 5 Mon May 21, 2018 4:08 pm
No new posts Remove all Parenthetical Statements -... JayaprakashT DB2 2 Fri Apr 27, 2018 3:57 am
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts Need inputs on DB2 tablespace/table r... ashek15 DB2 3 Sat Mar 24, 2018 11:49 pm

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