SQL reference for Databricks Runtime 7.x
This is a SQL command reference for users on Databricks Runtime 7.x clusters running in Databricks Workspace.
Note
- For Databricks Runtime 5.5 LTS and 6.x SQL commands, see SQL reference for Databricks Runtime 5.5 LTS and 6.x.
- For the SQL Analytics SQL reference, see SQL reference for SQL Analytics.
General reference
This general reference for Databricks SQL 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:
Data retrieval statements
You use the SELECT
statement 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
SELECT. The SQL statements related
to SELECT
are also included in this section.
Spark also provides the ability to generate 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:
- CACHE (Delta Lake on Databricks)
- CLONE (Delta Lake on Databricks)
- CONVERT TO DELTA (Delta Lake on Databricks)
- COPY INTO (Delta Lake on Databricks)
- CREATE BLOOM FILTER INDEX (Delta Lake on Databricks)
- DELETE FROM (Delta Lake on Databricks)
- DESCRIBE HISTORY (Delta Lake on Databricks)
- DROP BLOOM FILTER INDEX (Delta Lake on Databricks)
- FSCK REPAIR TABLE (Delta Lake on Databricks)
- GENERATE (Delta Lake on Databricks)
- MERGE INTO (Delta Lake on Databricks)
- OPTIMIZE (Delta Lake on Databricks)
- RESTORE (Delta Lake on Databricks)
- UPDATE (Delta Lake on Databricks)
- VACUUM
For details on using Delta Lake statements, see Delta Lake and Delta Engine guide.
Auxiliary statements
You use auxiliary statements to collect statistics, manage caching, explore metadata, set configurations, and manage resources:
Security statements
You use security SQL statements to manage access to data:
For details using these statements, see Data object privileges.