diff --git a/modules/querying/pages/data-modification-statements.adoc b/modules/querying/pages/data-modification-statements.adoc index bfaca6ca..3e91900c 100644 --- a/modules/querying/pages/data-modification-statements.adoc +++ b/modules/querying/pages/data-modification-statements.adoc @@ -285,7 +285,11 @@ will produce the following result: == `INSERT INTO` Statement The `INSERT INTO` statement adds edges or vertices to the graph. -When the ID value(s) for the inserted vertex/edge match those of an existing vertex/edge, the new values will overwrite the old values. +When the ID value(s) of the inserted vertex or edge match an existing one, the new value(s) are updated depending on the attribute type: + +* **Primitive attributes** — The new value will overwrite the old value. +* **Collection attributes (`LIST`, `SET`, `MAP`)** — the new value(s) are appended to the old value. This behavior is similar to xref:gsql-ref:ddl-and-loading:creating-a-loading-job.adoc#_loading_a_list_or_set_attribute[cumulative loading for collection attributes]. + To insert an edge, its endpoint vertices must already exist, either before running the query or inserted earlier in that query. The `INSERT INTO` statement can be used as a query-body-level statement or a DML-sub statement.