我有以下ms sql查询:
MERGE drivessold as T USING specs as S ON drivessold.SKU = specs.SKU_num WHEN MATCHED THEN UPDATE SET drivessold.color = specs.color, drivessold.speed = specs.speed;
如何在mysql中执行类似的查询?注意:sku和sku\ num不是表中的键(这是唯一的)。
rsaldnfx1#
在mysql中,这个操作需要join
UPDATE drivessold JOIN specs ON drivessold.SKU = specs.SKU_num SET drivessold.color = specs.color, drivessold.speed = specs.speed;
1条答案
按热度按时间rsaldnfx1#
在mysql中,这个操作需要join