diff options
author | robot-piglet <[email protected]> | 2025-04-24 13:01:50 +0300 |
---|---|---|
committer | robot-piglet <[email protected]> | 2025-04-24 13:12:15 +0300 |
commit | cc1add0c1ca513213dc8ecaaed41a3f328c353ef (patch) | |
tree | a23a5945dbd4d82ec421e67d4733f6717e16cf0a /yql/essentials/docs/en/syntax | |
parent | ff506a248dded6b0309406ff3892cd07e80e51c6 (diff) |
Intermediate changes
commit_hash:dc3193604b8e3f1c1a2e012318f542b2497d7638
Diffstat (limited to 'yql/essentials/docs/en/syntax')
-rw-r--r-- | yql/essentials/docs/en/syntax/insert_into.md | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/yql/essentials/docs/en/syntax/insert_into.md b/yql/essentials/docs/en/syntax/insert_into.md index 36b1287cdd7..c99f77e6795 100644 --- a/yql/essentials/docs/en/syntax/insert_into.md +++ b/yql/essentials/docs/en/syntax/insert_into.md @@ -9,13 +9,13 @@ The table is searched by name in the database specified by the [USE](use.md) ope * Adding constant values using [`VALUES`](values.md). ```yql - INSERT INTO my_table (Key1, Key2, Value1, Value2) + INSERT INTO my_table (Column1, Column2, Column3, Column4) VALUES (345987,'ydb', 'Pied piper', 1414); COMMIT; ``` ```yql - INSERT INTO my_table (key, value) + INSERT INTO my_table (Column1, Column2) VALUES ("foo", 1), ("bar", 2); ``` @@ -23,11 +23,16 @@ The table is searched by name in the database specified by the [USE](use.md) ope ```yql INSERT INTO my_table - SELECT Key AS Key1, "Empty" AS Key2, Value AS Value1 - FROM my_table1; + SELECT SourceTableColumn1 AS MyTableColumn1, "Empty" AS MyTableColumn2, SourceTableColumn2 AS MyTableColumn3 + FROM source_table; ``` +## Using modifiers + Inserts can be made with one or more modifiers. A modifier is specified after the `WITH` keyword following the table name: `INSERT INTO ... WITH SOME_HINT`. -If a modifier has a value, it's indicated after the `=` sign: `INSERT INTO ... WITH SOME_HINT=value`. -If necessary, specify multiple modifiers, they should be enclosed in parentheses: `INSERT INTO ... WITH (SOME_HINT1=value, SOME_HINT2, SOME_HINT3=value)`. + +The following rules apply when working with modifiers: + +- If a modifier has a value, it's indicated after the `=` sign: `INSERT INTO ... WITH SOME_HINT=value`. +- If necessary, specify multiple modifiers, they should be enclosed in parentheses: `INSERT INTO ... WITH (SOME_HINT1=value, SOME_HINT2, SOME_HINT3=value)`. |