SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let's say I'm querying a big list but only need a subset of the rows for demo purposes. What's the easiest way to say "Top 100 Rows" or similar in CAML? Can't seem to find a statement out there. Thanks!

share|improve this question

Are you using SPQuery object? If so, you can use the RowLimit property of SPQuery object.

share|improve this answer
Not quite, I'm using a SSIS Datasource component which queries from SharePoint lists. It takes in CAML so that's feasible, but setting row limit wouldn't be (though the code is open source, a few tweaks could fix that). – tekiegreg Oct 21 '10 at 1:53

You can do this with the RowLimit element.


From what I can find, it should look something like this:

<RowLimit Paged="TRUE">100</RowLimit>

Never used it myself though.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.