08-export.md 825 字节
Newer Older
1 2 3 4
---
title: Data Export
---

5 6 7
There are two ways of exporting data from a TDengine cluster:
- Using a SQL statement in TDengine CLI
- Using the `taosdump` tool
8 9 10

## Export Using SQL

11
If you want to export the data of a table or a STable, please execute the SQL statement below, in the TDengine CLI.
12 13 14 15 16 17 18 19 20

```sql
select * from <tb_name> >> data.csv;
```

The data of table or STable specified by `tb_name` will be exported into a file named `data.csv` in CSV format.

## Export Using taosdump

21
With `taosdump`, you can choose to export the data of all databases, a database, a table or a STable, you can also choose to export the data within a time range, or even only export the schema definition of a table. For the details of using `taosdump` please refer to [Tool for exporting and importing data: taosdump](/reference/taosdump).