I have a table in which certain words or word groups are stored. I want to select entries which start with an uppercase letter, cointain no space and contain only letters. My SQ
List words = session.createCriteria(Word.class)
.setProjection(Projections.property("word"))
.add(Restrictions.and(Restrictions.gt("w_id",100), Restrictions.sqlRestriction(word REGEXP '^[A-Z][A-Za-z]*$')))
.setMaxResults(2000).list();