My databse is MS SQL. I want to use ROW_NUMBER()
in HQL. Is it possible? How? I know
about Custom Functions
. But prefer a way that does not need to modify web.config.
UPDATE:
My final goal is to delete all records in a table/entity except than last n records with HQL. I don't like to load all of them in memory then deleting them.