Delete data from a table.
DELETE [TOP term] FROM tableName [WHERE expression] [LIMIT term]
tableName- the name of the table to delete data from.
LIMIT- specifies the number of entries to be deleted (no limit if null or smaller than zero).
DETELE command removes data from a table (aka. cache in Ignite).
Since Ignite stores all the data in a form of key-value pairs, all the DELETE statements are finally transformed into a set of key-value operations.
DELETE statements' execution is split into two phases and is similar to the execution of
First, using a
SELECT query, the SQL engine gathers those keys that satisfy the
WHERE clause in the
DELETE statement. Next, after having all those keys in place, it creates a number of
EntryProcessors and executes them with
cache.invokeAll(...). While the data is being deleted, additional checks are performed to make sure that nobody has interfered between the
SELECT and the actual removal of the data.
Refer to concurrent modifications section that explains how SQL engine solves concurrency issues.
Delete all the
Persons with a specific name:
DELETE FROM Person WHERE name = 'John Doe';
Java, .NET, C++ users can execute
DELETE queries using native APIs:
Updated less than a minute ago