update box_draw_record set gold_price = coalesce((select gold from diamond.item_price where item_id = box_draw_record.item_id), 0) where gold_price = 0

以下sql 修改为如果item_price没有对应数据时gold_price更新为0 update box_draw_record set gold_price = select gold from diamonditem_price where item_id = box_draw_recorditem_id where gold_price = 0

原文地址: https://www.cveoy.top/t/topic/cOKq 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录