标签: java spring hibernate
我想使用HibernateTemplate()对象从表中删除第一个'N'行。如何将其指定给HibernateTemplate对象?
答案 0 :(得分:0)
delete from table_name WHERE rowid IN (SELECT rowid FROM table_name WHERE rownum <= &no_of_rows_to_keep);