Skip to content

Commit

Permalink
DOC-1162: add insert
Browse files Browse the repository at this point in the history
  • Loading branch information
BohuTANG committed Jul 24, 2021
1 parent ff4e51a commit 9b55a32
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
id: dml-insert
title: INSERT
---

Writing data.

## Syntax

```
INSERT INTO [db.]table [(c1, c2, c3)] VALUES (v11, v12, v13), (v21, v22, v23), ...
```


!!! note
Local engine is one of `Memory`, `Parquet`, `JSONEachRow`, `Null` or `CSV`, data will be stored in the FuseQuery memory/disk locally.

Remote engine is `remote`, will be stored in the remote FuseStore cluster.

## Examples

### Memory engine

```sql
mysql> CREATE TABLE test(a UInt64, b Varchar) Engine = Memory;

mysql> INSERT INTO test(a,b) values(888, 'stars');
mysql> INSERT INTO test values(1024, 'stars');

mysql> SELECT * FROM test;
+------+-------+
| a | b |
+------+-------+
| 888 | stars |
| 1024 | stars |
+------+-------+
```
1 change: 1 addition & 0 deletions website/datafuse/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ nav:
- DROP TABLE: sqlstatement/data-definition-language-ddl/ddl-drop-table.md
- Data Manipulation Language:
- SELECT: sqlstatement/data-manipulation-language-dml/dml-select.md
- INSERT: sqlstatement/data-manipulation-language-dml/dml-insert.md
- Describe Commands:
- DESCRIBE TABLE: sqlstatement/describe-commands/describe-table.md
- Show Commands:
Expand Down

0 comments on commit 9b55a32

Please sign in to comment.