mongodb translation for sql INSERT…SELECT

后端 未结 4 1214
无人及你
无人及你 2021-01-05 10:11

How to simply duplicate documents from collectionABC and copy them into collectionB if a condition like {conditionB:1} and add a timestamp like ts_imported - without knowing

4条回答
  •  [愿得一人]
    2021-01-05 10:34

    It seems that this works in the context of sequence generation http://docs.mongodb.org/manual/tutorial/create-an-auto-incrementing-field/

提交回复
热议问题