0

i want to get total rows number same like

select count() from (select count() from tableA group by column1)

i m searching for my problem on net, but not find solution

2
  • cant you just do select count of distinct column1, column2? why do you want to count and do a count on that? Commented Apr 5, 2012 at 14:06
  • actully i want same like select COUNT(a.y0_) from ( select distinct COUNT(centermas1_.CenterID) as y0_ from LinkMaster this_ inner join CenterMaster centermas1_ on this_.CenterId=centermas1_.CenterID where 1=1 ) Commented Apr 5, 2012 at 14:15

1 Answer 1

1

Use Projections:

criteria.setProjection(Projections.rowCount()).uniqueResult();
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.