我有以下查询:
SELECT BUSINESS_NAME, 'KEYWORD', REPLACE(BUSINESS_NAME, ' ', '-')
FROM clearindia.business b
LEFT OUTER JOIN `clearindia`.`keywords_master` km ON km.KEYWORD_TEXT = b.BUSINESS_NAME
WHERE km.KEYWORD_TEXT IS NULL
AND b.business_name='Dey Radio Service'
GROUP BY BUSINESS_NAME
它给了我以下结果:
# BUSINESS_NAME, KEYWORD, REPLACE(BUSINESS_NAME, ' ', '-')
'Dey Radio service', 'KEYWORD', 'Dey-Radio service'
REPLACE(BUSINESS_NAME,'',' - ')工作不正常,不会用' - '替换第二个空格。那是为什么?
请注意:BUSINESS_NAME的归类为utf_unicode_ci。