File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Rows count in hql

 
meghana maganti
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to retrieve the number of rows returned with out retrieving the data, can anyone help me how to do this.

I tried some thing like this
select count(*) from table11 join.. where ....

Usually select .. from ... returns a list but I need the result into an int variable which gives me the number of rows with out bringing in the rows.
 
miguel lisboa
Ranch Hand
Posts: 1281
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Usually select .. from ... returns a list

list.size()?
 
Scott Johnson
Ranch Hand
Posts: 518
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See the Hibernate Documentation section 15.14.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic