File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Rows count in hql Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Rows count in hql" Watch "Rows count in hql" New topic

Rows count in hql

meghana maganti

Joined: Sep 13, 2005
Posts: 11
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

Joined: Feb 08, 2004
Posts: 1281
Usually select .. from ... returns a list


java amateur
Scott Johnson
Ranch Hand

Joined: Aug 24, 2005
Posts: 518
See the Hibernate Documentation section 15.14.
I agree. Here's the link:
subject: Rows count in hql
It's not a secret anymore!