17,377
社区成员
发帖
与我相关
我的任务
分享
UPDATE SHOPPING_STATICPAGEINFO SPI
SET SPI.UNITPRICE = (SELECT MP.CURRENTSALEPRICE
FROM SHOPPING_MARKPRICE MP
WHERE SPI.TYPEID = MP.MARKTYPEID
AND SPI.UNITPRICE <> MP.CURRENTSALEPRICE)
WHERE EXISTS
(SELECT 1
FROM SHOPPING_MARKPRICE MP SPI.TYPEID = MP.MARKTYPEID AND SPI.UNITPRICE <> MP.CURRENTSALEPRICE)
update shopping_staticpageinfo spi
set spi.unitprice
=(select mp.currentsaleprice from shopping_markprice mp
where spi.typeid = mp.marktypeid and spi.unitprice<>mp.currentsaleprice)
where spi.typeid = mp.marktypeid and spi.unitprice<>mp.currentsaleprice
update shopping_staticpageinfo spi
set spi.unitprice
=(select mp.currentsaleprice from shopping_markprice mp
where spi.typeid = mp.marktypeid and spi.unitprice<>mp.currentsaleprice