below is my requirement
i need to push second_name values to first_name column only when first_name columns are null.
for example,
i want drake and jim to be moved to first_name column and should not be present in second_name column.Rest of the names should be same as it is.
CodePudding user response:
Looks like
update your_table set
first_name = second_name,
second_name = null
where first_name is null;