Then you can sort by order by the primary key of the first 5, this query can be used as a sub-query, and then delete by the primary key
DELETE
FROM
table
WHERE
filed >= '20110709'
AND rownum <= 5
wants to delete meet the conditions filed > Can I write the first 5 pieces of data of = '20110709' in this way? I tested it and it looks like it works.
0 Answer
Then you can sort by order by the primary key of the first 5, this query can be used as a sub-query, and then delete by the primary key
这家伙很懒,什么都没留下...