# Meta

These functions can be used to retrieve specific metadata from a SurrealDB Record ID.

> [!NOTE]
> These functions are deprecated. Prefer SurrealDB's [record](/docs/reference/query-language/functions/database-functions/record.md) functions instead.

These functions can be used to retrieve specific metadata from a SurrealDB Record ID.

<table>
  <thead>
    <tr>
      <th scope="col">Function</th>
      <th scope="col">Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td scope="row" data-label="Function"><a href="#metaid"><code>meta::id()</code></a></td>
      <td scope="row" data-label="Description">Extracts and returns the identifier from a SurrealDB Record ID</td>
    </tr>
    <tr>
      <td scope="row" data-label="Function"><a href="#metatb"><code>meta::tb()</code></a></td>
      <td scope="row" data-label="Description">Extracts and returns the table name from a SurrealDB Record ID</td>
    </tr>
  </tbody>
</table>

## `meta::id`

The `meta::id` function extracts and returns the identifier from a SurrealDB Record ID.

```surql title="API DEFINITION"
meta::id(record) -> value
```
The following example shows this function, and its output, when used in a [`RETURN`](/docs/reference/query-language/statements/return.md) statement:

```surql
RETURN meta::id(person:tobie);

"tobie"
```

<br />

## `meta::tb`

The `meta::tb` function extracts and returns the table name from a SurrealDB Record ID.

```surql title="API DEFINITION"
meta::tb(record) -> string
```
The following example shows this function, and its output, when used in a [`RETURN`](/docs/reference/query-language/statements/return.md) statement:

```surql
RETURN meta::tb(person:tobie);

"person"
```

The equivalent [`record::tb`](/docs/reference/query-language/functions/database-functions/record.md#recordtb) function can also be called using the path `record::table`.

```surql
RETURN record::table(person:tobie);

"person"
```

<br /><br />
