DEV Community

Goffity Corleone
Goffity Corleone

Posted on

Copy collection in same database.

Copy collection in same database without dump command.

db.collectionName.aggregate([{$match:{}},{$out:"copyCollectionName"}])

Enter fullscreen mode Exit fullscreen mode

Top comments (0)