新聞中心
1.查看集合
成都創(chuàng)新互聯(lián)公司公司2013年成立,先為覃塘等服務(wù)建站,覃塘等地企業(yè),進(jìn)行企業(yè)商務(wù)咨詢服務(wù)。為覃塘企業(yè)網(wǎng)站制作PC+手機(jī)+微官網(wǎng)三網(wǎng)同步一站式服務(wù)解決您的所有建站問題。
show collections
2.向集合中添加數(shù)據(jù)
db.runoob.insertMany([
{
'title':'data1',
'url':'https://blog.51cto.com/suyanzhu',
'description':'this is data1',
'view':5000
},
{
'title':'data2',
'url':'https://blog.51cto.com/suyanzhu',
'description':'this is data2',
'view':3650
},
{
'title':'data3',
'url':'https://blog.51cto.com/suyanzhu',
'description':'this is data3',
'view':9527
}
])
3.向集合添加數(shù)據(jù)
db.runoob.insert({
title: 222,
description: 'MongoDB',
by: 'suyanzhu',
url: 'https://blog.51cto.com/suyanzhu',
tags: ['php','mongodb'],
likes: 200
})
4.查看所有數(shù)據(jù)
db.runoob.find().pretty()
5.返回指定行數(shù)數(shù)據(jù)
db.runoob.find().pretty().limit(2)
6.通過skip()方法來跳過limit指定數(shù)量的數(shù)據(jù)
db.runoob.find().pretty().limit(2).skip(2)
網(wǎng)頁題目:MongoDB通過skip()方法來跳過limit指定數(shù)量的
當(dāng)前路徑:http://fisionsoft.com.cn/article/giegdo.html