I'm trying to learn more about using Oracle, and I'm trying to understand loops and how to use them. I've got this :
loop
update table
set amount=(amount+3)
exit when amount>=20
end loop;
Currently amount is 12, so I'd expect it to add 3 to amount until it reaches 21, because then it will be greater than 20. But the error I get is "ORA-00933: SQL command not properly ended" I've also got loop and exit underlined in red.
Am I missing something simple, or am I misunderstanding how to use loops?