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)
文章名稱:MongoDB通過skip()方法來跳過limit指定數(shù)量的
網(wǎng)站URL:http://chinadenli.net/article10/giegdo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站內(nèi)鏈、做網(wǎng)站、品牌網(wǎng)站建設(shè)、云服務(wù)器、Google、網(wǎng)頁設(shè)計(jì)公司
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)