aspose file tools*
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 Java 8 in Action this week in the Java 8 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
Comparable interface problem
Transfer Excel Sheet information to database
requestdispatcher.forward() Doubt?
jdbc connection and query execution
HFSJ page#356 chapter 8---A query