Geeks Talk

Prepare for your Next Interview




Child tables cat_id is not deleting

This is a discussion on Child tables cat_id is not deleting within the MY SQL forums, part of the Databases category; hi, i have created a table of category like ///////////create table category(cat_id int,Name varchar(20),primary key(cat_id)) engine=InnoDB;/////////////// again i ahave cretaed a child table (sub_cat) ...


Go Back   Geeks Talk > Databases > MY SQL

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 09-29-2007
Junior Member
 
Join Date: Aug 2007
Location: KERALA
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
priyaranjan_BISWAL is on a distinguished road
Child tables cat_id is not deleting

hi,

i have created a table of category like

///////////create table category(cat_id int,Name varchar(20),primary
key(cat_id)) engine=InnoDB;///////////////

again i ahave cretaed a child table (sub_cat) having foreign key on
the category table's cat_id. like

////////create table sub_cat(cat_id int,Name varchar(20),Type
varchar(20),Author varchar(20),
INDEX c_id (cat_id), foreign key(cat_id)
references category(cat_id) on delete cascade)
ENGINE=INNODB; ////////////

But the problem is that when you are deleting the parent tables cat_id
its consequnce child tables cat_id is not deleting.
I have created a index also on the child
table so as to delete the respective data.
But unable to use it.
If any one have the answer pls forward.....

Caution:Its working in Oracle9i
Regards
Priyaranjan
Reply With Quote
Sponsored Links
Reply

  Geeks Talk > Databases > MY SQL


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
Method to excute child objects script ypraveen_77 QTP 2 01-06-2008 01:54 AM
Selected project does not have any child BC mail2diptesh Seibel 1 07-24-2007 02:12 AM
Child appear to be read-only until i do a manual refresh Lokesh M Seibel 0 07-02-2007 11:04 AM
Who is deleting my post and why ? nikhil_rattan Suggestions & Feedback 1 01-18-2007 11:52 PM


All times are GMT -4. The time now is 04:29 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved