标签:inner desc lis order by ace 模糊查询 oom and like
1.根据a表中的字段col,修改b表中的col
UPDATE a INNER JOIN b ON a.id = b.id SET b.col = xx WHERE a.col = xx
2.模糊查询 like 的替换为FIND_IN_SET
SELECT
*
FROM
sku a
LEFT JOIN classroom b ON a.targetId = b.id
WHERE
FIND_IN_SET(59, REPLACE(a.sn, ‘|‘, ‘,‘))
AND a.targetType = "classroom"
AND b.recommended = 1
AND b.`status` = ‘published‘
GROUP BY
a.targetId
ORDER BY
b.recommendedSeq DESC,
b.recommendedTime DESC;
标签:inner desc lis order by ace 模糊查询 oom and like
原文地址:https://www.cnblogs.com/xiaobingch/p/12464659.html