File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Customer Requirements for Developers this week in the Jobs Discussion 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: 17271

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 execute other dml statements syntax remains the same both for Jpql and HQL.
I agree. Here's the link:
subject: differences between HQL and JPQL
It's not a secret anymore!