> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-trino-dialect.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> UNDROP TABLE 문서

# UNDROP TABLE

테이블 삭제를 취소합니다.

ClickHouse 버전 23.3부터는 `Atomic` 데이터베이스에서 `DROP TABLE`을 실행한 후 [`database_atomic_delay_before_drop_table_sec`](/ko/reference/settings/server-settings/settings/other#database_atomic_delay_before_drop_table_sec)로 설정된 기간(기본값 8분) 동안 `UNDROP TABLE`을 사용하여 테이블을 복구할 수 있습니다.
`Atomic` 데이터베이스에서 삭제된 테이블은 `system.dropped_tables`에 나열됩니다.

ClickHouse Cloud의 `Shared` 데이터베이스에서는 이 기간이 [`database_shared_drop_table_delay_seconds`](/ko/reference/settings/session-settings/database#database_shared_drop_table_delay_seconds)로 제어되며, 기본값은 8시간입니다.
`Shared` 데이터베이스에서 삭제된 테이블은 `system.dropped_tables`에 나열되지 않습니다.

삭제된 테이블과 연결된 `TO` 절 없는 materialized view가 있는 경우, 해당 view의 내부 테이블도 UNDROP해야 합니다.

<Tip>
  [DROP TABLE](/ko/reference/statements/drop)도 참조하십시오
</Tip>

구문:

```sql theme={null}
UNDROP TABLE [db.]name [UUID '<uuid>'] [ON CLUSTER cluster]
```

**예시**

```sql theme={null}
CREATE TABLE tab
(
    `id` UInt8
)
ENGINE = MergeTree
ORDER BY id;

DROP TABLE tab;

SELECT *
FROM system.dropped_tables
FORMAT Vertical;
```

```response theme={null}
Row 1:
──────
index:                 0
database:              default
table:                 tab
uuid:                  aa696a1a-1d70-4e60-a841-4c80827706cc
engine:                MergeTree
metadata_dropped_path: /var/lib/clickhouse/metadata_dropped/default.tab.aa696a1a-1d70-4e60-a841-4c80827706cc.sql
table_dropped_time:    2023-04-05 14:12:12

1 row in set. Elapsed: 0.001 sec. 
```

````sql theme={null}
UNDROP TABLE tab;

SELECT *
FROM system.dropped_tables
FORMAT Vertical;

```response
Ok.

0 rows in set. Elapsed: 0.001 sec. 
````

```sql theme={null}
DESCRIBE TABLE tab
FORMAT Vertical;
```

```response theme={null}
Row 1:
──────
name:               id
type:               UInt8
default_type:       
default_expression: 
comment:            
codec_expression:   
ttl_expression:     
```
