示例:- create table cfbiz_customer(
- id varchar(20),
- fullname varchar(20),
- id_number varchar(20),
- telephone varchar(20)
- )charset=utf8;
- insert into cfbiz_customer values
- ('1' , '张三' , '8809201437', '1532601888x' ),
- ('2' , '张三' , '8809201437', '1368989565x' );
复制代码 点击"Run SQL"- SELECT fullname as 客户名称, id_number as 身份证号, GROUP_CONCAT(telephone) as 联系电话 FROM cfbiz_customer WHERE id_number = '8809201437' GROUP BY id_number
复制代码 立即会在下方显示结果。 |