MySQL Forums
Forum List  »  InnoDB

Re: Inseret records from one table to many
Posted by: atjun yadav
Date: March 23, 2017 12:37PM

I want to have this following two table from the main t_csv table

parent_id parent_category
1 Main
2 pc-22
3 Unanai-parent
4 Aqu-parent
5 Afga-parent
6 Indana-parant
7 Tib-parent

from parent_id 3 to 7 inserted from the t_csv file. The parent_id are generated
automatically and are unique.

id category parent_category
1 Ayurvedic Meds 1
2 Pet Meds 1
3 Best Seller 1
4 Unanai 3
5 Aqu 4
6 Afga 5
7 Indana 6
8 Tib 7

Now the above autogenerated parent_id becomes the parent_category in t_category
i,e from parent_category from 3 to 7 is same as that of parent_id in t_pcategory.

Options: ReplyQuote

Written By
Re: Inseret records from one table to many
March 23, 2017 12:37PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.