Files
dbx/docs/content/docs/database-export.cn.mdx
T
t8y2 89fa8c02be docs: add landing page and upgrade all documentation with advanced components
- Add product landing page with hero section, stats, feature cards, database badges, comparison table, and screenshots
- Register Fumadocs MDX components (Tabs, Steps, Callout, Cards, Accordions) globally
- Rewrite all 17 doc pages (CN + EN) with richer content, use cases, and advanced components
- Add competitive comparison table (vs DBeaver/Navicat/TablePlus)
- Add ~300 lines of responsive landing page CSS
2026-05-07 14:53:35 +08:00

56 lines
1.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: 数据库导出
description: 将数据库导出为 SQL 文件,包含表结构和数据,支持行数限制。
---
<Callout type="info">
一键导出完整数据库:表结构(DDL)+ 数据(INSERT),批量 INSERT 提高导入效率,可配置行数限制。
</Callout>
## 导出内容
- **表结构(DDL)** — `CREATE TABLE` 语句,包括列定义、主键、索引、约束等
- **表数据** — 以批量 `INSERT` 语句的形式导出
## 批量 INSERT
为了提高导入效率,DBX 将数据生成为批量 `INSERT` 语句:
```sql
INSERT INTO users (id, name, email) VALUES
(1, '张三', 'zhangsan@example.com'),
(2, '李四', 'lisi@example.com'),
(3, '王五', 'wangwu@example.com');
```
## 行数限制
可以配置每张表导出的最大行数,适用于:
- 只需要表结构和少量示例数据
- 表中数据量过大,完整导出文件体积过大
- 创建用于开发或测试的精简数据集
设置为 0 或留空表示导出全部数据。
## 使用方式
<Steps>
<Step>
### 选择数据库
选择要导出的连接和数据库。
</Step>
<Step>
### 配置选项
设置行数限制(可选)。
</Step>
<Step>
### 选择保存位置
选择导出文件的保存路径。
</Step>
<Step>
### 开始导出
导出的 `.sql` 文件可以通过 [SQL 文件执行](/cn/docs/sql-file) 功能重新导入。
</Step>
</Steps>