MySql常用函数汇总

1.  Group_concat:将查询结果用半角都好连接起来。

eg:select Group_concat(tag_name) from content_topic_tag_ref where topic_id = 50;

返回结果:123,abc,456

2. CONCAT:将查询结果拼接成一个字符串,返回结果为连接参数产生的字符串。如有任何一个参数为NULL ,则返回值为 NULL。

eg:select concat('11','22','33');

返回结果:112233

猜你喜欢

转载自guwq2014.iteye.com/blog/2156904