---
title: version function
description: Learn the syntax of the version function of the SQL language in Databricks SQL and Databricks Runtime.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/functions/version
---

# `version` function

**Applies to:** ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks SQL ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks Runtime

Returns the Apache Spark version.

Use [current\_version](https://docs.databricks.com/aws/en/sql/language-manual/functions/current_version.md) to retrieve the Databricks SQL version.

## Syntax

```
version()
```

## Arguments

The function takes no argument.

## Returns

A STRING that contains two fields, the first being a release version and the second being a git revision.

## Examples

```sql
> SELECT version();
 3.1.0 a6d6ea3efedbad14d99c24143834cd4e2e52fb40

> SELECT current_version().dbsql_version;
 2022.25

> SELECT current_version().dbr_version;
 11.0
```

## Related functions

* [`current_version` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/current_version.md)
