mysql记录解决的问题

1.把两行相同列的转成一行(group_concat)

select e.id from employee e  where e.id<3

mysql记录解决的问题_第1张图片
实现

SELECT GROUP_CONCAT(id) as ids
FROM employee ee 
WHERE ee.id in (select e.id from employee e where e.id<3)

mysql记录解决的问题_第2张图片

你可能感兴趣的:(mysql,mysql)