用 group_ concat 函数
SELECT g.*,GROUP_CONCAT(bt.name) bName
FROM gun g, guntype_bullettype gb , bullet_type bt
WHERE g.GUN_TYPE_ID = gb.GUN_TYPE_ID AND gb.BULLET_TYPE_ID = bt.BULLET_TYPE_ID
GROUP BY g.GUN_ID
用 group_ concat 函数
SELECT g.*,GROUP_CONCAT(bt.name) bName
FROM gun g, guntype_bullettype gb , bullet_type bt
WHERE g.GUN_TYPE_ID = gb.GUN_TYPE_ID AND gb.BULLET_TYPE_ID = bt.BULLET_TYPE_ID
GROUP BY g.GUN_ID