日期:2014-05-16  浏览次数:20869 次

mysql concat函数 字符串连接

    <span style="color: #0000ff; font-size: medium;">1.concat?</span>?

<span style="white-space: pre;"> </span>select concat("http://",host,":",port) from hostInfo

?

<span style="color: #0000ff; font-size: medium;">2.concat_ws?</span>concat with seperator

<span style="white-space: pre;"> </span>select concat("|", f1,f2 ) from table

?

<span style="color: #ff0000; font-size: medium;">3.group_concat </span>? group by 的加强版

<span style="white-space: pre;"> </span>select age, group_concat(name) from student_info group by age;

?

?

?

参见

?

http://apps.hi.baidu.com/share/detail/21460200