0

我有一个包含 group_concat 的查询,但它返回一个错误,即 group_concat 不是内置函数。请帮我解决这个问题。我的查询是这样的:

 SELECT cast(user_id as varchar(255)) AS member_id,skincareproductbarcode.barcode, skincareproduct.SCP_id, skincabinet.beautybox_id,  
        skincabinet.skpid, skincareproduct.photos, skincabinet.create_date, GROUP_CONCAT(MirrorProfile.serial_number, '') As Serial_Number
         from skincabinet join skincareproduct on skincareproduct.scp_id = skincabinet.skpid 
         full join skincareproductbarcode on skincabinet.skpid = skincareproductbarcode.scp_id
          full join membermirrorprofile on skincabinet.user_id = membermirrorprofile.member_id
           full join mirrorprofile on MemberMirrorProfile.mirror_id = mirrorProfile.mirror_id 
             where skincareproduct.approval_flag = 'N' and skincareproduct.photos != '' 
             and substring(photos,52,3) = 'scp' order by skincareproduct.SCP_id  group by skincareproduct.scp_id desc

我如何使用 group_concat 或者有其他方法吗?

4

1 回答 1

0

字段的连接不应该是 SQL 查询的输出。它不是为此而设计的。使用接收数据的工具来执行此操作。

于 2017-08-16T04:03:49.963 回答