-2

I have a table with multiple occurence of a value (SKU) linked with a certain value for another column (column2). I want to update the value of column2 with the first match of SKU.

Update table set column2 = test where sku = 18.

I have twice the value 18 for sku, but wanna update column2 only on the first occurence of sku = 18.

How

1 Answers1

1
update table set column2 = test where sku = 18 order by id limit 1;
yasith sam
  • 453
  • 3
  • 8