create table dummy{id int ,invoice int }
insert into dummy values(191,10),(192,11),(193,0);
I have to update 193 with invoice 13
but i want to fetch max invoice and then increment invoice by 1 for 193 .
i had tried
update dummy set invoice=(select max(invoice) from dummy)+1
where id=191.
It wont work
Thank you