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

# `current_database` 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 current schema. This function is an alias for [`current_schema` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/current_schema.md).

## Syntax

```
current_database()
```

## Arguments

This function takes no arguments

## Returns

A STRING.

## Examples

```sql
> SELECT current_database();
 default
```

## Related functions

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