Hi, with Oracle, how to delete all rows that belong to the following result? SELECT * FROM (SELECT DATA FROM MY_TABLE WHERE KEY = X ORDER BY STAMP DESC) WHERE ROWNUM > 10 Don't know, how to pack this resultset description in the WHERE CLAUSE of the DELETE command. Thanks for any advice. Kind regards, dx05 asked Jan 23 '13 at 15:55 dx05 |
Hi! First of all, I think you SQL will never return anything:
Now your statement:
Without
So, you'd probably expect your query to return 90 rows, but it doesn't because
This is also explained in my (free online) book. The next step is to put this into a
I've used the pseudocolumn answered Feb 06 '13 at 12:11 Markus Winand ♦♦ |