Statement

Statement objects are used to run SQL commands on the data grid. Queries (SELECT statements) and data manipulation language (DML) SQL commands can be run by using Statement objects. Statement objects are created by invoking the createStatement() method on the Session object.

A Statement object is created for each individual SQL command. A Statement can be run multiple times and must be closed when it is no longer needed.

You can either create a query by using the SELECT statement or update rows by using an INSERT or an INSERT OR REPLACE statement. The INSERT statement is supported for both, transacted and non-transacted sessions. For details about INSERT statement, see The SQL INSERT Statement. For information about INSERT OR REPLACE statement, see The INSERT OR REPLACE Statement.

Related concepts