Delete From a Table

The delete() function is executed on a table from a data source connected to MindsDB. It deletes rows from a table.

Syntax

/**
 * Deletes record from table using filters
 *
 * >>> table.delete("a=1", "b=2")
 *
 * @param filters array of filters to filter deleted rows,
 * delete("column=value", ...)
 */
 public void delete(String... filters)

Example

Project mindsdb = server.getProject();
Database maria  = server.getDatabase("mariadb");
MDBTable table = maria.getTable("another_table");
table.delete("this=1", "that=2");
Updated on