# Statements

This section provides manual pages for both high-level language constructs and parts thereof. For example, the CREATE INDEX statement is a high-level statement that you can execute directly via the JDBC interface. This section also includes clauses, which are not high-level statements and which you cannot execute directly but only as part of a high-level statement. The ORDER BY and WHERE clauses are examples of this kind of clause. Finally, this section also includes some syntactically complex portions of statements called expressions, for example selectExpression and tableSubquery. These clauses and expressions receive their own manual pages for ease of reference.

Unless it is explicitly stated otherwise, you can execute or prepare and then execute all the high-level statements, which are all marked with the word statement, via the interfaces provided by JDBC. This manual indicates whether an expression can be executed as a high-level statement.

The sections provide general information about statement use, and descriptions of the specific statements.

- Interaction with the dependency system
  Derby internally tracks the dependencies of prepared statements, which are SQL statements that are precompiled before being executed. Typically they are prepared (precompiled) once and executed multiple times.
- ALTER TABLE statement
  The ALTER TABLE statement modifies a table.
- CALL (PROCEDURE) statement
  The CALL (PROCEDURE) statement invokes a procedure. A call to a procedure does not return any value.
- CREATE statements
- DECLARE GLOBAL TEMPORARY TABLE statement
  The DECLARE GLOBAL TEMPORARY TABLE statement defines a temporary table for the current connection.
- DELETE statement
  The DELETE statement removes rows from a table.
- DROP statements
- GRANT statement
  The GRANT statement gives privileges to a specific user or role, or to all users, to perform actions on database objects.
- INSERT statement
  The INSERT statement creates one or more rows and stores them in the named table.
- LOCK TABLE statement
  The LOCK TABLE statement explicitly acquires a shared or exclusive table lock on the specified table.
- MERGE statement
  The MERGE statement scans a table and either INSERTs, UPDATEs, or DELETEs rows depending on whether the rows satisfy a specified condition.
- RENAME statements
- REVOKE statement
  The REVOKE statement removes privileges from a specific user or role, or from all users, to perform actions on database objects.
- SELECT statement
  The SELECT statement performs a query on one or more tables.
- SET statements
- TRUNCATE TABLE statement
  The TRUNCATE TABLE statement quickly removes all content from the specified table and returns it to its initial empty state.
- UPDATE statement
  The UPDATE statement updates the value of one or more columns of a table.

Parent topic: SQL language reference
Related concepts
SQL identifiers
Built-in system functions
Built-in system procedures
Data types
Related reference
Capitalization and special characters
SQL clauses
SQL expressions
JOIN operations
SQL queries
Built-in functions
SYSCS_DIAG diagnostic tables and functions