RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
MongoDB通过skip()方法来跳过limit指定数量的

1.查看集合

成都创新互联公司公司2013年成立,先为覃塘等服务建站,覃塘等地企业,进行企业商务咨询服务。为覃塘企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。

show collections

MongoDB通过skip()方法来跳过limit指定数量的

2.向集合中添加数据

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

}

])

MongoDB通过skip()方法来跳过limit指定数量的

3.向集合添加数据

db.runoob.insert({

        title: 222, 

        description: 'MongoDB',

        by: 'suyanzhu',

        url: 'https://blog.51cto.com/suyanzhu',

        tags: ['php','mongodb'],

        likes: 200

})

MongoDB通过skip()方法来跳过limit指定数量的

4.查看所有数据

db.runoob.find().pretty()

MongoDB通过skip()方法来跳过limit指定数量的

5.返回指定行数数据

db.runoob.find().pretty().limit(2)

MongoDB通过skip()方法来跳过limit指定数量的

6.通过skip()方法来跳过limit指定数量的数据

db.runoob.find().pretty().limit(2).skip(2)

MongoDB通过skip()方法来跳过limit指定数量的

MongoDB通过skip()方法来跳过limit指定数量的


网站名称:MongoDB通过skip()方法来跳过limit指定数量的
标题网址:http://scyingshan.cn/article/giegdo.html