MySql查询结果拼接成字符串

select group_concat("'",b.id,"'")  from sys_role_menu a ,sys_menu b where a.menu_id=b.id

 

'1','20','21','22','2a0f940fbe304a05a6b4040ddf6df279','3c1c639c76f14f6f9903b0143371ea09','4','5','6','6509eed6eb634030a46723a18814035c','68f9151151174868ab436e11e03bf548','6c672b854d2b4821b89297640df5fc26','7','79','79f0ffa47dbe43ffa8824d97612d344f','79fca849d3da4a82a4ade3f6b9f45126','8','82','9','a83edd5c8d424d12bc46986f93f9a140','b9a776f5d7194406bb466388e3af9d08','c3de25a76785419b8a6820db3935941d','d3f1b6f292904ef5b95f7800cc777a48','d64d25d7b3014f9ba7736867cb2ffc43','d75f64438d994fc4830b1b3d138cde32','de7c50d276454f80881c41a096ecf55c','e03f8b6a5e454addb04fc08033b6f60b','e824b7c20bb34c9ca9ad023e8873e67b','ec7cf7a144a440cab217aabd4ffb7788','f34887a78fa245c1977603ca7dc98e11','f93f9a3a2226461dace3b8992cf055ba'

 

你可能感兴趣的:(mysql)