How to write stored procedure to insert data from one table to another?

Hi,
How to insert data from one table to another table?. Lets take i have table A & table B.
A table has column ID, Name, title, Age, Description. B table has column called ID, Name.
If i insert data to table A column Name, the Name field should get automatically insert to Table B. How to achieve?
Thanks

  1. use API to load data from table A

  2. use API to write data to table B

Hi.

It’s called Custom Business Logic.
You need to write a custom event handler for the afterCreate event.

Backendless.enablePromises();
Backendless.ServerCode.Persistence.afterCreate('TableA', function(req, res) {
    return Backendless.Data.of('TableB').save({ name: req.item.name });
}, true);

Thank you, i will check and let you know. Thanks for the support