The insert()
function is executed on a table from a data source connected to MindsDB. It inserts data into a table.
Syntax
/**
* Insert data into table
*
* @param query a Query object representing the data to insert
*/
public void insert(Query query)
/**
* Insert data into table
*
* @param query a Tablesaw Table object representing the data to insert
*/
public void insert(Table query)
Example
Database maria = server.getDatabase("mariadb");
MDBTable table = maria.getTable("another_table");
// tableToInser can be query or Tablesaw Table
table.insert(tableToInsert);