'MySQL sending data of dynamically created table

I'm creating a MySQL database to store data of tables which columns can change. This is why I'm using a stored procedure to dynamically create the tables.

My procedures allow creating, for example, a table with three double columns "ColumnA", "ColumnB" and "ColumnC".

Now I need to populate those tables with numbers from an application. This could be thousands of rows. I'm wondering how can I transfer the data without doing a query per each cell.

Up to now, my only idea is to create a stored procedure that, given the row ID and the column name, creates or updates the cell value.

However, it doesn't feel like a good idea considering that tables could have around 10 columns and 1.000 rows, which would require 10.000 calls to the procedure.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source