| |

VerySource

 Forgot password?
 Register
Search
View: 1294|Reply: 8

How to delete the first ten data

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-3-11 10:00:01
| Show all posts |Read mode
I want to submit every 10 records deleted, is there no delete top 10 method in oracle?
Reply

Use magic Report

0

Threads

3

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 Mexico

Post time: 2020-6-4 16:00:01
| Show all posts
delete from table1
where id in (select top 10 id from table1...)...
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-6-5 18:15:01
| Show all posts
delete from T3TN01_REGUL_STK_WORK where id in(select top 10 id from T3TN01_REGUL_STK_WORK where PROC_FLG = '1')
Reply

Use magic Report

0

Threads

71

Posts

50.00

Credits

Newbie

Rank: 1

Credits
50.00

 China

Post time: 2020-6-7 14:00:01
| Show all posts
for example:

select r,e.* from (select rownum r,last_name,salary from (
select last_name,salary from employees order by nvl(salary,0) desc)) e
where r <11;
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-6-7 17:30:02
| Show all posts
delete from table where rowid in (Select rowid from table where rownum <=10);
commit;
Reply

Use magic Report

0

Threads

13

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-6-20 15:45:01
| Show all posts
旋律de茶叶positive solution
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-20 21:45:01
| Show all posts
Use rownum
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-20 22:45:01
| Show all posts
delete from table where rownum<11;
This seems to work.
I don't understand the commit behind旋律de茶叶; what does it mean? Who will talk about it!
Reply

Use magic Report

0

Threads

71

Posts

50.00

Credits

Newbie

Rank: 1

Credits
50.00

 China

Post time: 2020-7-21 16:45:01
| Show all posts
Commit is to submit the transaction, otherwise, the dml update is not written into the data file of the database, and it is still in memory
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list