This feature is in Public Preview.
This is a SQL command reference for Databricks SQL and Databricks Runtime.
The SQL reference encompasses both Databricks SQL and Databricks Runtime. Near the top of each article is a label that indicates which products and versions are supported for that article.
For example, this article applies to all versions for both Databricks SQL and Databricks Runtime:
Applies to: Databricks SQL Databricks Runtime
In this example, this article applies to all version of Databricks SQL and Databricks Runtime versions 11.1 and above:
Applies to: Databricks SQL Databricks Runtime 11.1 and above
In this example, this article just applies to Databricks SQL and is not supported in Databricks Runtime:
Applies to: Databricks SQL
In some cases, an article mostly applies to a product, but certain parameters within an article are only supported by one product or specific versions of a product. In this case, the Applies to label is inserted into the appropriate parameter in the body of the article. For example:
The top of an article might state: Applies to: Databricks SQL Databricks Runtime
One specific parameter within the article might indicate Applies to: Databricks SQL Databricks Runtime 11.1 and above. This means that most of the document is supported by all versions of both Databricks SQL and Databricks Runtime, and that specific parameter is supported by all versions of Databricks SQL and only Databricks Runtime versions 11.1 and above.
Another specific parameter within the article might indicate Applies to: Databricks Runtime 11.1 and above. This means that most of the document is supported by all versions of Databricks SQL and Databricks Runtime, but that specific parameter is not supported by Databricks SQL and is only supported in Databricks Runtime versions 11.1 and above.
This general reference describes data types, functions, identifiers, literals, and semantics:
- How to read a syntax diagram
- Configuration parameters
- Data types and literals
- SQL data type rules
- Datetime patterns
- Built-in functions
- H3 geospatial functions
- Lambda functions
- Window functions
- Null semantics
- JSON path expressions
- ANSI compliance
- Apache Hive compatibility
- Privileges and securable objects in the Hive metastore
- Reserved words
You use data definition statements to create or modify the structure of database objects in a database:
- ALTER DATABASE
- ALTER TABLE
- ALTER SCHEMA
- ALTER VIEW
- COMMENT ON
- CREATE BLOOMFILTER INDEX
- CREATE DATABASE
- CREATE FUNCTION (SQL)
- CREATE FUNCTION (External)
- CREATE SCHEMA
- CREATE TABLE
- CREATE VIEW
- DROP BLOOMFILTER INDEX
- DROP DATABASE
- DROP FUNCTION
- DROP SCHEMA
- DROP TABLE
- DROP VIEW
- MSCK REPAIR TABLE
- TRUNCATE TABLE
You use data manipulation statements to add, change, or delete data from a Delta Lake table:
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
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
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?.
You use auxiliary statements to collect statistics, manage caching, explore metadata, set configurations, and manage resources:
Applies to: Databricks Runtime