Cloud

SQL Statements

SQL statements are commands used to interact with Redpanda SQL. These statements let you query data, manage catalog connections, and export results.

Redpanda SQL operates in read-only mode. Data mutation operations (INSERT, UPDATE, DELETE) and bulk import (COPY FROM) are not available. Data is ingested into Redpanda topics and made queryable through catalog mappings.

SQL Studio in Cloud Console adds its own limit on which statements you can run in the editor. See SQL Studio.

The following table summarizes the statements supported by Redpanda SQL:

Statement Description

ALTER …​ OWNER TO

Transfers ownership of a view or a schema to another role.

ALTER REDPANDA CATALOG

Modifies connection properties of an existing Redpanda catalog.

ALTER STORAGE

Modifies credentials or configuration of an existing storage connection.

ALTER TABLE

Modifies options of a catalog table mapped to a Redpanda topic.

CREATE REDPANDA CATALOG

Creates a named connection to a Redpanda cluster.

CREATE SCHEMA

Creates a SQL schema to organize views and catalog connections.

CREATE STORAGE

Creates a connection to external object storage.

CREATE TABLE

Maps a Redpanda topic to a SQL table through a catalog.

CREATE VIEW

Creates a view, a named query that you can reference like a table.

DROP TABLE

Removes a catalog table mapping. Does not delete the underlying Redpanda topic.

DROP VIEW

Removes a view.

DROP REDPANDA CATALOG

Removes a Redpanda catalog connection.

DROP SCHEMA

Removes a SQL schema, and optionally the objects in it.

DROP STORAGE

Removes a named storage definition.

EXPLAIN

Shows diagnostic information about the query planner, such as planner options and planning time for a query.

REFRESH

Updates the schema that Redpanda SQL stores for a table in a Redpanda catalog or an Iceberg catalog.

SELECT

Retrieves data from a table.

COPY TO

Exports query results or table data to CSV files.

SET/SHOW

Configures or displays session-level settings such as time zone and search path.

SHOW CATALOGS

Lists catalogs in the cluster. Variants list only Redpanda catalogs or only Iceberg catalogs.

SHOW EXECS

Displays currently running execution tasks across the cluster.

SHOW NODES

Displays the current state of nodes in a distributed cluster.

SHOW QUERIES

Displays currently running queries on the cluster.

SHOW TABLES

Lists tables mapped from Redpanda topics and Iceberg tables registered in the local catalog.

DESCRIBE

Shows detailed information about columns in a table, tables within a database, or catalog contents.