阿藏博客阿藏博客阿藏博客

所有文章第112页

技术教程

MongoDB 常用shell整理 一

shell命令操作语法和JavaScript很类似,其实控制台底层的查询语句都是用JavaScript脚本完成操作的。使用shell 命令,需要启动mongo.exe。 常用shell命令如下: 1、查询本地所有数据库名称 > show dbs; 2、切换至指定数据库环境(若无指定的数据库,则创建新的库) > use mydb; 3、查询当前库下...
赞 (0)
技术教程

MongoDB 常用shell整理 三

1、查询age列数据,并去掉重复数据 >db.mycollection.distinct('age'); 2、查询前10条数据 >db.mycollection.find().limit(10); 3、查询1条以后的所有数据 >db.mycollection.find().skip(1); 4、查询第一条数据 >d...
赞 (0)
技术教程

MongoDB 常用shell整理 四

1、根据username修改age >db.employee.update({username:'jim'},{$set:{age:22}},false,true); db.collection.update(criteria,objNew,upsert,multi) criteria:update的查询条件,类似sqlupdate...
赞 (0)
技术教程

CentOS 列出app可安装版本

有些程序需要安装旧版的时候,如何查看源包含的程序的版本? 以httpd为例: yum --showduplicates list httpd | expand 输出结果: Loaded plugins: fastestmirror, langpacks, refresh-packagekitLoading mirror speeds from cached ...
赞 (0)