Prepare for your Next Interview
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) ...
|
|||
|
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 |
| Sponsored Links |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| 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 |