# get\_database\_name

&#x20;`get_database_name` function has 1 variants:

{% tabs %}
{% tab title="Variant 1" %}
#### Description <a href="#description" id="description"></a>

Returns the database instance name of the connection whose name passed as a first parameter. If the connection does not exist, returns null.

#### Declaration <a href="#declaration" id="declaration"></a>

```
char get_database_name(char connectionName);
```

#### Parameters <a href="#parameters" id="parameters"></a>

`char connectionName` Connection name.

#### Return Value <a href="#return-value" id="return-value"></a>

Returns the database instance name of the connection if exists. Otherwise, returns null.

#### Example <a href="#example" id="example"></a>

```
void cb.show_database_name() {
        char info = get_database_name('default');
        message(info);
}
```
{% endtab %}
{% endtabs %}
