Apache Ignite SQL Documentation

The Apache Ignite SQL Developer Hub

Welcome to the Apache Ignite SQL developer hub. You'll find comprehensive guides and documentation to help you start working with Apache Ignite SQL as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Delete data from a table.

DELETE
  [TOP term] FROM tableName 
  [WHERE expression] 
  [LIMIT term]

Parameters

  • tableName - the name of the table to delete data from.
  • TOP, LIMIT - specifies the number​ of entries to be deleted (no limit if null or smaller than zero).

Description

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 UPDATE statements.

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.

Examples

Delete all the Persons with a specific name:

DELETE FROM Person WHERE name = 'John Doe';

Note

Java, .NET, C++ users can execute DELETE queries using native APIs:

See Also

Updated less than a minute ago

DELETE


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.