Home » RDBMS Server » Server Administration » How to delete the rows from a table with rownum is a multiple of 3
How to delete the rows from a table with rownum is a multiple of 3 [message #371475] Wed, 25 October 2000 22:13 Go to next message
Wesley Cheung
Messages: 1
Registered: October 2000
Junior Member
Hello,

I am doing the data testing on a project but the data is grouped into a certain range such as rownum 1 to 10 belongs to group 1.
To evenly delete some of the data from a row, I wish to delete the rows which has rownum as multiple of
3.

Does any one have any idea to solve this problem, thanks!

Wesley
Re: How to delete the rows from a table with rownum is a multiple of 3 [message #371513 is a reply to message #371475] Wed, 01 November 2000 03:57 Go to previous message
Sudha
Messages: 29
Registered: November 2000
Junior Member
Hi Wesley Cheung,

Try out this Satatement which is for emp table
it may help u out.
> Delete from emp where empno in(select empno from (select empno,rownum a from emp)
where mod(a,3)=0);

Sudha
Previous Topic: How to Store a query result in a text file?
Next Topic: Formatting results
Goto Forum:
  


Current Time: Thu May 02 06:19:00 CDT 2024