How is hql query created?



How is hql query created?..

Answer / Rahul Chakraborty

HQL queries are defined by writing a string in a syntax similar to SQL but for objects instead of tables. They start with 'FROM' clause, followed by the root entity class or alias and any JOINs if necessary, and end with optional WHERE, GROUP BY, ORDER BY, or other clauses. For example: 'SELECT p FROM Person p WHERE p.age > 30'.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Hibernate Interview Questions

What is hibernate criteria api?

1 Answers  


What does mappedby mean in hibernate?

1 Answers  


What is hibernate configuration?

1 Answers  


What are the advantages of Hibernate over JDBC?

1 Answers  


What are the three orm levels?

1 Answers  


Why do we need hibernate?

1 Answers  


What does hibernate.properties file consist of?

1 Answers  


What is the role played by sessionfactory interface in hibernate?

1 Answers  


What are different orm tools?

1 Answers  


What are the major benefits of hibernate?

1 Answers  


What is one to many and many to many relationships one to many?

1 Answers  


What’s the difference between session.save() and session.saveorupdate() methods in hibernate?

1 Answers  


Categories