i do not know about HQL but the problem here seem likeyou use createQuery while it can be execute only like thatsession.execute("delete from Artists where NickName = 'ee'")only i think it will work fineand there is no need for int i