1

show dbs

TestDB 0.078GB

use TestDB

switched to db TestDB

show collections

Employee

MyCollection

db.MyCollection.find()

{ "_id" : ObjectId("55cb93c412a2139d0a6078a1"), "MyNames" : "Sanal" }

mongoexport --db TestDB --collection MyCollection --type=csv --fields MyNames --out D:\contacts.csv

2015-08-22T00:44:20.380+0530 E QUERY SyntaxError: Unexpected identifier >

4

1 回答 1

0

从该错误消息看来,您仍在 mongo shell 中。mongoexport是一个单独的实用程序。你需要退出 mongo shell,命令就是exit. 然后在命令行中再次输入您的 mongoexport 命令。

于 2015-08-21T19:37:34.283 回答