SELECT userid,group_concat(distinct card_no) as card_no FROM card WHERE card_no <>'' GROUP BY userid

 

group_concat之把多条记录的值拼接到一个字段

相关文章: