# extract\_table\_from\_file\_name

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

## Syntax

```
sys.extract_table_from_file_name(path)
```

## Description

`extract_table_from_file_name` is a [stored function](https://mariadb.com/docs/server/server-usage/stored-routines/stored-functions) available with the [Sys Schema](https://mariadb.com/docs/server/reference/system-tables/sys-schema).

Given a file path, it returns the table name.

The function does not examine anything on disk. The return value, a VARCHAR(64), is determined solely from the provided path.

## Examples

```sql
SELECT sys.extract_table_from_file_name('/usr/local/mysql/data/db/t1.ibd');
+---------------------------------------------------------------------+
| sys.extract_table_from_file_name('/usr/local/mysql/data/db/t1.ibd') |
+---------------------------------------------------------------------+
| t1                                                                  |
+---------------------------------------------------------------------+
```

## See also

* [extract\_schema\_from\_file\_name()](https://mariadb.com/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/extract_schema_from_file_name)

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

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