Wednesday, July 30, 2008

Generating distinct rows in hibernate

You can not put a distinct in the clause.

You can select distinct rows though:
select distinct b.institution from MyBank b where b.institution LIKE UPPER(:startsWith)

This gives all institutions attached to a MyBank matching the startsWith.

No comments: