Quantcast
Channel: Java Programming Forum - Learn Java Programming - Hibernate
Viewing all articles
Browse latest Browse all 76

Advantage of HQL over SQL?

$
0
0
As the subject line says.

Telling that we have advantage of using shortened form of query when we retrieve all columns from a table is just too small a reason to have and use HQL.

HQL query:
Code:

From Employee
SQL query:
Code:

select * from Employee
The only advantage I can see is that in HQL we don't use "select *". So in HQL we use two words less. Now, is this advantage really and advantage? If there is any other advantage let me know.

Viewing all articles
Browse latest Browse all 76

Trending Articles