title: Mongodb query use skip and limit function in first N documents
body: <p>Can we make query which enable us to use skip and limit in first N documents?</p>
  
  <p>Ex : </p>
  
  <p>Suppose there are nearly 500 documents in a collection called teachers.</p>
  
  <p>I want a query which restrict me to read first 300 documents only. </p>
  
  <p>If I use skip(300) in that query it should display null.</p>
  
  <pre><code>db.teachers.find().pretty()
  
  {
    id : 1,
    name : "teach001"
  },
  {
    id : 2,
    name : "teach002"
  },
  {
    id : 3,
    name : "teach003"
  },
  {
    id : 4,
    name : "teach004"
  },
  {
    id : 5,
    name : "teach005"
  },
  {
    id : 6,
    name : "teach006"
  },
  {
    id : 7,
    name : "teach007"
  },
  {
    id : 8,
    name : "teach008"
  },
  {
    id : 9,
    name : "teach009"
  },
  {
    id : 10,
    name : "teach0010"
  }
  
  
  
   db.teachers.find({some query here to restrict access first 5 documents only }).skip(5).limit(5).pretty()
  </code></pre>