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 Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
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


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