File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Object Relational Mapping
Joined: Feb 09, 2007
Mar 06, 2007 20:29:00
i am writing in sql my query is "select max(sid) from Student" this is my query.
how i write same query using HQL
Joined: Apr 14, 2004
Mar 07, 2007 02:07:00
Its written pretty much the same as you would in SQL:
select max(object.property) from Object object
However, why do you want the max id? I would normally expect an aggregate function to be used on a numeric property, not the primary key?
subject: retrive data
Transfer Excel Sheet information to database
Comparable interface problem
HFSJ page#356 chapter 8---A query
jdbc connection and query execution
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014