This section contains the reference documentation for the Splice Machine SQL Statements, in the following subsections:

Data Definition - General Statements

These are the data definition statements:

Statement Description
ALTER TABLE Add, deletes, or modifies columns in an existing table.
GRANT Gives privileges to specific user(s) or role(s) to perform actions on database objects.
RENAME COLUMN Renames a column in a table.
RENAME INDEX Renames an index in the current schema.
RENAME TABLE Renames an existing table in a schema.
REVOKE Revokes privileges for specific user(s) or role(s) to perform actions on database objects.
TRUNCATE TABLE Resets a table to its initial empty state.

Data Definition (DDL) - CREATE Statements

These are the create statements:

Statement Description
CREATE EXTERNAL TABLE Allows you to query data stored in a flat file as if that data were stored in a Splice Machine table.
CREATE FUNCTION Creates Java functions that you can then use in expressions.
CREATE INDEX Creates an index on a table.
CREATE PROCEDURE Creates Java stored procedures, which you can then call using the Call Procedure statement.
CREATE ROLE Creates SQL roles.
CREATE SCHEMA Creates a schema.
CREATE SEQUENCE Creates a sequence generator, which is a mechanism for generating exact numeric values, one at a time.
CREATE SYNONYM Creates a synonym, which can provide an alternate name for a table or a view.
CREATE TABLE Creates a new table.
CREATE TEMPORARY TABLE Defines a temporary table for the current connection.
CREATE TRIGGER Creates a trigger, which defines a set of actions that are executed when a database event occurs on a specified table
CREATE VIEW Creates a view, which is a virtual table formed by a query.
DECLARE GLOBAL TEMPORARY TABLE Defines a temporary table for the current connection.

Data Definition (DDL) - DROP Statements

These are the drop statements:

Statement Description
DROP FUNCTION Drops a function from a database.
DROP INDEX Drops an index from a database.
DROP PROCEDURE Drops a procedure from a database.
DROP ROLE Drops a role from a database.
DROP SCHEMA Drops a schema from a database.
DROP SEQUENCE Drops a sequence from a database.
DROP SYNONYM Drops a synonym from a database.
DROP TABLE Drops a table from a database.
DROP TRIGGER Drops a trigger from a database.
DROP VIEW Drops a view from a database.
DROP FUNCTION Drops a function from a database.

Data Manipulation (DML) Statements

These are the data manipulation statements:

Statement Description
CALL PROCEDURE Calls a stored procedure.
DELETE Deletes records from a table.
INSERT Inserts records into a table.
SELECT Selects records.
UPDATE TABLE Updates values in a table.

Session Control Statements

These are the session control statements:

Statement Description
SET ROLE Sets the current role for the current SQL context of a session.
SET SCHEMA Sets the default schema for a connection's session.

For access to the source code for the Community Edition of Splice Machine, visit our open source GitHub repository.