Hibernate Query Example - Sql

What is hibernate query language?

Snippet Code


  
Rate this page :
  [ 0 votes]

HQL is known as hibernate query language which is an object oriented language. It is similar to SQL. Hibernate query operates in objects and their properties instead of operating in tables and columns. HQL are translated into conventional SQL queries which performs action on database. The syntax for from clause is given below.

String hql = "FROM Employee"; Query query = session.createQuery(hql); List results = query.list();

Tags


Ask Questions

Ask Question