1、通过eval参数执行指定语句
比如,需要查询test库的t1表中的记录数有多少,常用方法如下:
[root@localhost bin]# ./mongo test
MongoDB shell version: 2.6.6
connecting to: test
> db.t1.count();
0
>
1、通过eval参数执行指定语句
比如,需要查询test库的t1表中的记录数有多少,常用方法如下:
[root@localhost bin]# ./mongo test
MongoDB shell version: 2.6.6
connecting to: test
> db.t1.count();
0
>