i have a table where termid,termversion are two primary key. column present in table - termid,termversion,name
我想选择所有名称为 % AB%
的术语, 结果应该包含每个匹配的术语, 并包含最大版本号 。
示例:
id name ver
1 ABBBB 1
1 ABBBB 2
1 ABBBB 3
2 ABC 1
2 ABC 2
输出应产生输出
1 ABBBB 3
2 ABC 2
I want to write this query in hibernate using Criteria...if any one can suggest me in hibernate then its really good else at least help me in writing the sql query. PS I am using postgresql