title: How to write HQL Insert query?
body: <p>I am struggling to write a HQL query for inserting a new record in a table. I have seen some of insert query as below but I don't want insert data from another table as below code.</p>
  
  <pre><code>String hql = "INSERT INTO Employee(firstName, lastName, salary)"  + 
               "SELECT firstName, lastName, salary FROM old_employee";
  Query query = session.createQuery(hql);
  int result = query.executeUpdate();
  System.out.println("Rows affected: " + result);
  </code></pre>
  
  <p>For example I have a table "User" with three fields like name, age, number and I have entity for this user table. what will be the insert query for this?</p>