A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
video training course this week in the
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?
rocket mass heater
subject: retrive data
HFSJ page#356 chapter 8---A query
Transfer Excel Sheet information to database
jdbc connection and query execution
Comparable interface problem
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015