This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes retrive data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "retrive data" Watch "retrive data" New topic
Author

retrive data

madhuchilipi reddy
Greenhorn

Joined: Feb 09, 2007
Posts: 17
i am writing in sql my query is "select max(sid) from Student" this is my query.
how i write same query using HQL
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Its written pretty much the same as you would in SQL:

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?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: retrive data
 
Similar Threads
jdbc connection and query execution
HFSJ page#356 chapter 8---A query
requestdispatcher.forward() Doubt?
Transfer Excel Sheet information to database
Comparable interface problem