I have this table:
CREATE TABLE `Factura` (
`IDFactura` BIGINT NOT NULL AUTO_INCREMENT,
`TipoDevolucionActual` VARCHAR(10) NOT NULL,
`TipoDevolucionAnterior` VARCHAR(10) NOT NULL,
PRIMARY KEY (`IDFactura`)
);
When trying to update a row in order to interchange TipoDevolucionActual
value with TipoDevolucionAnterior
value I get the same value in both fields.
I tried to do it like this:
update Factura SET
TipoDevolucionAnterior=TipoDevolucionActual,
TipoDevolucionActual=TipoDevolucionAnterior WHERE IDFactura=1;
How can I solve this problem?