gpt4 book ai didi

mongodb - 是否可以像 sql server 中的临时表一样在 mongoDB 中创建临时集合?

转载 作者:可可西里 更新时间:2023-11-01 09:12:06 25 4
gpt4 key购买 nike

我想在 mongodb 中创建一个临时集合,就像在 Sql Server 中创建临时表一样。如果可能,请告诉我该怎么做。

最佳答案

您可以使用 2.6 版中引入的 $out 运算符,您可以将聚合管道的输出写入一个集合并将其用作临时集合,在达到您的目的后可以将其删除。

这是链接: https://docs.mongodb.com/v3.2/reference/operator/aggregation/out/

关于mongodb - 是否可以像 sql server 中的临时表一样在 mongoDB 中创建临时集合?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39096735/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com