copy parent records with child records

  • Hello below is my table structure

    Master Table

    ID Name

    --------

    1 record1

    2 record2

    3 record3

    first child

    ID Name MasterID

    -----------------

    1 asdasd 1 (fk master)

    2

    3

    4

    child of first child

    ID Name MasterID

    -----------------

    1 asdasd 1(FK first child)

    all i want to do is when i provide an id of the master record, and a new name for that, it must copy and create a new record of that master data. and then all child elements related to old master needs to be copied in the same tables for the new master id.

    any suggestions on this ?

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply