---
title: currentDatabase
description: "Catalog.currentDatabase method in PySpark: Returns the current default database in this session."
canonical_url: https://docs.databricks.com/gcp/en/pyspark/reference/classes/catalog/currentDatabase
---

# currentDatabase

Returns the current default database in this session.

## Syntax

```
currentDatabase()
```

## Returns

`str`

The current default database name.

## Examples

```python
spark.catalog.currentDatabase()
# 'default'
```
