如果值不为空,我试图在其中输入一个空格,但它似乎只在我运行查询时输出一个数字?
CONCAT(address, IF(address2 = '', '', ' ' & address2), ' ', city, ', ', state, ' ', zip) AS theAddress
上面的查询输出是:
1234 N. Shore Ave.0 Burbank, CA 41577
输出应如下所示:
1234 N. Shore Ave. Apartment 223 Burbank, CA 41577
我会在这里做错什么?