1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
SQL> select * from <table>;
Col1 Col2
---------------- ---------------------------------
1 YD
2 YDE
3 YD
4 YD
5 YD
6 AYD
7 AYD
8 YD
9 YD
10 YD
10 ligne(s) sélectionnée(s).
SQL> update <table> a
2 set a.col1 = 111
3 where a.col2 = 'YD'
4 and (select count(*) from <table> b
5 where b.col2 = 'YD'
6* and b.col1 <= a.col1) < 3
2 ligne(s) mise(s) à jour.
SQL> select * from <table>;
col1 col2
---------------- ---------------------------------
111 YD
2 YDE
111 YD
4 YD
5 YD
6 AYD
7 AYD
8 YD
9 YD
10 YD
10 ligne(s) sélectionnée(s). |