> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/sys_get_config.md).

# sys\_get\_config

{% hint style="info" %}
Sys Schema is available from MariaDB 10.6.
{% endhint %}

## Syntax

```
sys.sys_get_config(name,default)
```

## Description

`sys_get_config` is a [stored function](/docs/server/server-usage/stored-routines/stored-functions.md) available with the [Sys Schema](/docs/server/reference/system-tables/sys-schema.md).

The function returns a configuration option value from the [sys\_config table](/docs/server/reference/system-tables/sys-schema/sys-schema-sys_config-table.md). It takes two arguments; *name*, a configuration option name, and *default*, which is returned if the given option does not exist in the table.

Both arguments are `VARCHAR(128)` and can be `NULL`. Returns `NULL` if *name* is `NULL`, or if the given option is not found and *default* is `NULL`.

## Examples

```sql
SELECT sys.sys_get_config('ps_thread_trx_info.max_length',NULL);
+----------------------------------------------------------+
| sys.sys_get_config('ps_thread_trx_info.max_length',NULL) |
+----------------------------------------------------------+
| 65535                                                    |
+----------------------------------------------------------+
```

## See Also

* [Sys Schema sys\_config Table](/docs/server/reference/system-tables/sys-schema/sys-schema-sys_config-table.md)

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}
