龍巖易富通網(wǎng)絡(luò)科技有限公司

龍巖小程序開發(fā),龍巖分銷系統(tǒng)

MySQL concat將多個(gè)字符串連接成一個(gè)字符串

2015.09.10 | 766閱讀 | 0條評(píng)論 | 數(shù)據(jù)庫

SELECT * FROM `myvigo`.`0597dns_goods` where store_id=74 OR CONCAT(',', store_id2, ',') LIKE '%,74,%' ;   

舉個(gè)例子 select concat('aa','bb');

最終顯示的就是 aabb,同時(shí),concat有 to_char的作用,就是把其他類型轉(zhuǎn)成varchar類型的


贊 (

發(fā)表評(píng)論