SQL Statements: Overview

All SQL statements (sql_statement) can be embedded in programming languages and, with the exception of NEXT STAMP, can be specified interactively.

Comments can be specified for every SQL statement.

For many SQL statements, example statements have been formulated using the demo data for the SQL tutorial.

SQL Statements for Data Definition

CREATE TABLE statement

DROP TABLE statement

ALTER TABLE statement
RENAME TABLE statement
RENAME COLUMN statement
EXISTS TABLE statement

CREATE SCHEMA statement

RENAME SCHEMA statement

DROP SCHEMA statement

CREATE DOMAIN statement

DROP DOMAIN statement

CREATE SEQUENCE statement

DROP SEQUENCE statement

CREATE SYNONYM statement

DROP SYNONYM statement

RENAME SYNONYM statement

CREATE VIEW statement

DROP VIEW statement

RENAME VIEW statement

CREATE INDEX statement

DROP INDEX statement

ALTER INDEX statement
RENAME INDEX statement

CREATE DBPROC statement

DROP DBPROC statement

CREATE SYSTEM TRIGGER statement

DROP SYSTEM TRIGGER statement

CREATE FUNCTION statement

DROP FUNCTION statement

CREATE TRIGGER statement

DROP TRIGGER statement

COMMENT ON statement

SQL Statements for Authorization

CREATE USER statement

DROP USER statement

ALTER USER statement
RENAME USER statement
GRANT USER statement

CREATE USERGROUP statement

DROP USERGROUP statement

ALTER USERGROUP statement
RENAME USERGROUP statement
GRANT USERGROUP statement

CREATE ROLE statement

DROP ROLE statement

ALTER PASSWORD statement

GRANT statement

REVOKE statement

SQL Statements for Data Manipulation

INSERT statement

UPDATE statement

DELETE statement

NEXT STAMP statement

CALL statement

SQL Statements for Data Query

QUERY statement

SINGLE SELECT statement

EXPLAIN Statement

OPEN CURSOR statement

FETCH statement

CLOSE statement

SQL Statements for Transaction Management

CONNECT statement

SET statement

COMMIT statement

ROLLBACK statement

INNER TRANSACTION statement

SUBTRANS statement

SAVEPOINT statement

ROLLBACK TO statement

RELEASE SAVEPOINT statement

LOCK statement

UNLOCK statement

RELEASE statement

SQL Statements for Statistics Management

UPDATE STATISTICS statement

MONITOR statement