---
title: detach_chunk() | Tiger Data Docs
description: Detach a chunk from a hypertable.
---

Since [2.21.0](https://github.com/timescale/timescaledb/releases/tag/2.21.0)

Separate a chunk from a [hypertable](/docs/learn/hypertables/understand-hypertables/index.md).

![Hypertable structure with time-based partitioning into chunks](/docs/_astro/hypertable-structure.CyTvF21Z_CcUht.webp)

The chunk becomes a standalone hypertable with the same name and schema. All existing constraints and indexes on the chunk are preserved after detaching. Foreign keys are dropped.

In this initial release, you cannot detach a chunk that has been [converted to the columnstore](/docs/build/columnar-storage/setup-hypercore/index.md).

## Samples

Detach a chunk from a hypertable:

```
CALL detach_chunk('_timescaledb_internal._hyper_1_2_chunk');
```

## Arguments

The syntax is:

```
CALL detach_chunk(
    chunk = '<chunk_name>'
);
```

| Name    | Type     | Description                  |
| ------- | -------- | ---------------------------- |
| `chunk` | REGCLASS | Name of the chunk to detach. |

## Returns

This function returns void.
