I have two databases. I want to export specific tables form main database to another database by programmatically. I am using node.js.

Is there any packages or idea available means please share.

1 Answers

Narayan Sharma On

To make it functional you have to establish multiple database connections within the node project. Few things you have to follow.

1) Create a database connection with the main table

2) Get table schema in which you want to export.(you can research how to get mysql table schema in nodejs)

3) Store received schema to variables.

4) close the previous database connection.

5) create a New database connection in which you want to export.

6) create the schema using the variable values.