0

I am having difficulties getting a subset of results From a huge set of results and then performing a join on this particular subset.. can anyone help regarding this??

More specifically,

Say I have an student Table which contains 1000 rows of student and department table which has the list of departments. What I want to do is to get a subset of rows say from 510 to 520 and then perform a join on these rows with the department table..

can anyone help me regarding this???

2
  • How is student mapped to departments? Commented Jul 7, 2010 at 14:00
  • each student table has a field called department_id which is mapped to the Department_id of the DEPARTMENT TABLE . Commented Jul 8, 2010 at 7:13

1 Answer 1

1

You can do it using one and only query:

Once you have your criteria object, do this:

criteria.SetFirstResult(510).SetMaxResult(10);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.