I need to convert this select:
select *
from (select * from game where rownum <= 4 order by rownum desc)
where rownum = 1;
to update but i don't know how i tried something like this
update game
set x4 = 0
where (select *
from game
where (select * from game where rownum <= 4 order by desc)
where rownum = 1);
but it's completly wrong, i know... Any ideas or it's impossible to make in plsql?
what data is looks like (it's an example):
x1 x2 x3 x4 x5 x6
1 2 1 6 2 2 1
2 2 2 3 3 2 3
3 5 5 3 2 3 2
4 5 4 4 4 5 5
5 4 3 4 1 2 6
6 1 2 2 5 2 2
what table i want after update (column x4 and row 4 changed into 0):
x1 x2 x3 x4 x5 x6
1 2 1 6 2 2 1
2 2 2 3 3 2 3
3 5 5 3 2 3 2
4 5 4 4 0 5 5
5 4 3 4 1 2 6
6 1 2 2 5 2 2
im trying to make alghoritm to find the best way to destination, the point is that there is no id, but in sum up i think i will need to add it anyway because it's no way to make it on those rownums...