SQL language reference

This is a SQL command reference for Databricks SQL and Databricks Runtime.

For information about using SQL with Delta Live Tables, see Delta Live Tables SQL language reference.


Databricks SQL Serverless is not available in Azure China. Databricks SQL is not available in Azure Government regions.

General reference

This general reference describes data types, functions, identifiers, literals, and semantics:

DDL statements

You use data definition statements to create or modify the structure of database objects in a database:

DML statements

You use data manipulation statements to add, change, or delete data from a Delta Lake table:

Data retrieval statements

You use a query to retrieve rows from one or more tables according to the specified clauses. The full syntax and brief description of supported clauses are explained in the Query article. The related SQL statements SELECT and VALUES are also included in this section.

Databricks SQL also provides the ability to generate the logical and physical plan for a query using the EXPLAIN statement.

Delta Lake statements

You use Delta Lake SQL statements to manage tables stored in Delta Lake format:

For details on using Delta Lake statements, see What is Delta Lake?.

Auxiliary statements

You use auxiliary statements to collect statistics, manage caching, explore metadata, set configurations, and manage resources:

Analyze statement

Apache Spark Cache statements

Applies to: check marked yes Databricks Runtime

Describe statements

Show statements

Configuration, variable management, and misc statements

Resource management

Applies to: check marked yes Databricks Runtime

Security statements

You use security SQL statements to manage access to data:

For details about using these statements, see Hive metastore privileges and securable objects (legacy).