TABLE tab
sl_no name marks status
1 dude 33 y
2 dudz 38 y
3 duda 44 y
4 dudi 55 y
select marks from tab where name ='dudi';
But my question is how to add or subtract a row value[marks]
like i need to add 10 to that selected person’s marks
update tab set marks ='marks'+10 where name ='dudi';
update tab set marks =(select marks from tab where name ='dudi') +10 where name ='dudi';
output
4 dudi 65 y
but i am not able to add the marks to it..
The first syntax should be correct, just don’t put marks in quote. It should be:
update tab set marks = marks + 10 where name ='dudi';