Hql syntax structure (the update/delete clause is a new feature introduced by hibernate3)
[Select/update/delete]
[From...]
[Where...]
[Group by... [having...]
[Order by...]
Hql = "select distinct user. Admin from user as user ";
Distinct indicates removing duplicate values.
This keyword is available when the product and module fields are added in the Add Table of testcase.
Hql = "select count (*) from user ";
Hql = "select AVG (user. Age) from user as user ";
Hql = "select upper (user. Name) from user as user ";
Hql = "from user as user where user. Name is not null ";
Update user set name = "Vivian" where name = "Peggy"; // No alias is given to the user class
Delete user where name = "Peggy ";
Criteria query and Query Interfaces provide two methods for completing Paging
Setfirstresult (0); // fetch data from 0th
Setmaxresult (10); // a total of 10 records are obtained.