This I just invented and it does not work
delete a.valor
from persona a
where a.Id = 3
How can I delete only 555
I understand why you thought that a DELETE
judgment would be necessary. But take into account that the verb in the sentence applies to the record, not to an individual field. And since your intention is not to delete ( DELETE
) the record, but to update the record by emptying a field, then the verb to use is UPDATE
:
update persona
set valor = null
where id = 3
Of course, this assumes that your valor
column is set to accept NULL
values.