wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes differences between HQL and JPQL 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 "differences between HQL and JPQL" Watch "differences between HQL and JPQL" New topic

differences between HQL and JPQL

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi ,

Please let me know if what is the difference in JPQL vs. HQL syntax .

Save India From Corruption - Anna Hazare.
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17249

Main difference is that you must put a "SELECT" in JPA whereas in HQL it is not required.

For any other difference, it is best to look at the Hibernate documentation.

They pretty much are the same. Very small differences at all.

Good Luck


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Thank you very much Mark .
nisu pathak

Joined: Nov 03, 2013
Posts: 29
hey Differance exist for only select statement.to execute other dml statements syntax remains the same both for Jpql and HQL.
I agree. Here's the link: http://aspose.com/file-tools
subject: differences between HQL and JPQL
Similar Threads
java.lang.ClassCastException: java.lang.Integer cannot be cast to com.user
Hibernate JPQL/HQL: aggregate functions show results of wrong table/entity joined twice
Basic understanding of JPQL and HQL
outer join in HQL
Hibernate suppourt with JPA