Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Object Relational Mapping
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Object Relational Mapping
retrive data
madhuchilipi reddy
Greenhorn
Posts: 17
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
Posts: 10336
I like...
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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?
JavaRanch FAQ
HowToAskQuestionsOnJavaRanch
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
requestdispatcher.forward() Doubt?
HFSJ page#356 chapter 8---A query
Transfer Excel Sheet information to database
jdbc connection and query execution
Comparable interface problem
More...